This commit is contained in:
Georgy Litvinov 2020-07-22 13:05:00 +02:00
parent d0d2ac0dd9
commit c3f2490abd
8 changed files with 303 additions and 605 deletions

View file

@ -2,7 +2,7 @@ apply plugin: 'java'
repositories{
mavenCentral()
}
def releaseVersion = "0.5.14"
def releaseVersion = "0.6.2"
def propertyFile = file "src/main/java/w2phtml/project.properties"
Properties properties = new Properties()
propertyFile.withReader { properties.load(it) }
@ -53,7 +53,6 @@ task xhtml(type: Jar) {
manifest {
attributes("Implementation-Title": rootProject.name,
"Implementation-Version": releaseVersion,
"Built-By": "litvinovg",
"RegistrationClassName" : "org.openoffice.da.comp.writer2xhtml.W2XRegistration",
"Class-Path" : "jasp.jar parser.jar")
}

View file

@ -1,517 +0,0 @@
/************************************************************************
*
* BatchConverter.java
*
* Copyright: 2002-2009 by Henrik Just
*
* This file is part of Writer2LaTeX.
*
* Writer2LaTeX is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Writer2LaTeX is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Writer2LaTeX. If not, see <http://www.gnu.org/licenses/>.
*
* Version 1.3.1 (2014-08-04)
*
*/
package org.openoffice.da.comp.writer2xhtml;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import com.sun.star.lib.uno.adapter.XInputStreamToInputStreamAdapter;
import com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter;
import com.sun.star.beans.PropertyValue;
import com.sun.star.document.XDocumentProperties;
import com.sun.star.document.XDocumentPropertiesSupplier;
import com.sun.star.frame.XComponentLoader;
import com.sun.star.frame.XStorable;
import com.sun.star.io.NotConnectedException;
import com.sun.star.io.XInputStream;
import com.sun.star.io.XOutputStream;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.lang.XServiceName;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.sheet.XSpreadsheetDocument;
import com.sun.star.text.XTextDocument;
import com.sun.star.ucb.CommandAbortedException;
import com.sun.star.ucb.XSimpleFileAccess2;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import w2phtml.api.ConverterFactory;
import w2phtml.api.IndexPageEntry;
import w2phtml.api.MIMETypes;
import w2phtml.api.OutputFile;
// Import interfaces as defined in uno idl
import org.openoffice.da.writer2xhtml.XBatchConverter;
import org.openoffice.da.writer2xhtml.XBatchHandler;
import org.openoffice.da.comp.w2lcommon.helper.PropertyHelper;
/** This class provides a uno component which implements the interface
* org.openoffice.da.writer2xhtml.XBatchConverter
*/
public class BatchConverter implements
XBatchConverter,
XServiceName,
XServiceInfo,
XTypeProvider {
/** The component will be registered under this name.
*/
public static final String __serviceName = "org.openoffice.da.writer2xhtml.BatchConverter";
public static final String __implementationName = "org.openoffice.da.comp.writer2xhtml.BatchConverter";
private XComponentContext xComponentContext = null;
private XSimpleFileAccess2 sfa2 = null;
private w2phtml.api.BatchConverter batchConverter = null;
private XBatchHandler handler;
// Based on convert arguments
private boolean bRecurse = true;
private String sWriterFilterName = "org.openoffice.da.writer2xhtml";
private Object writerFilterData = null;
private String sCalcFilterName = "org.openoffice.da.calc2xhtml";
private Object calcFilterData = null;
private boolean bIncludePdf = true;
private boolean bIncludeOriginal = false;
private boolean bUseTitle = true;
private boolean bUseDescription = true;
private String sUplink = "";
private String sDirectoryIcon = "";
private String sDocumentIcon = "";
private String sTemplateURL = null;
public BatchConverter(XComponentContext xComponentContext) {
this.xComponentContext = xComponentContext;
// Get the SimpleFileAccess service
try {
Object sfaObject = xComponentContext.getServiceManager().createInstanceWithContext(
"com.sun.star.ucb.SimpleFileAccess", xComponentContext);
sfa2 = (XSimpleFileAccess2) UnoRuntime.queryInterface(XSimpleFileAccess2.class, sfaObject);
}
catch (com.sun.star.uno.Exception e) {
// failed to get SimpleFileAccess service (should not happen)
}
}
// Helper: Get a string from an any
private String getValue(Object any) {
if (AnyConverter.isString(any)) {
try {
return AnyConverter.toString(any);
}
catch (com.sun.star.lang.IllegalArgumentException e) {
return "";
}
}
else {
return "";
}
}
// Implementation of XBatchConverter:
public void convert(String sSourceURL, String sTargetURL, PropertyValue[] lArguments, XBatchHandler handler) {
// Create batch converter (currently we don't need to set a converter)
batchConverter = ConverterFactory.createBatchConverter(MIMETypes.XHTML);
this.handler = handler;
// Read the arguments
int nSize = lArguments.length;
for (int i=0; i<nSize; i++) {
String sName = lArguments[i].Name;
Object value = lArguments[i].Value;
if ("Recurse".equals(sName)) {
bRecurse = !"false".equals(getValue(value));
}
else if ("IncludePdf".equals(sName)) {
bIncludePdf = !"false".equals(getValue(value));
}
else if ("IncludeOriginal".equals(sName)) {
bIncludeOriginal = "true".equals(getValue(value));
}
else if ("UseTitle".equals(sName)) {
bUseTitle = !"false".equals(getValue(value));
}
else if ("UseDescription".equals(sName)) {
bUseDescription = !"false".equals(getValue(value));
}
else if ("Uplink".equals(sName)) {
sUplink = getValue(value);
}
else if ("DirectoryIcon".equals(sName)) {
sDirectoryIcon = getValue(value);
}
else if ("DocumentIcon".equals(sName)) {
sDocumentIcon = getValue(value);
}
else if ("TemplateURL".equals(sName)) {
sTemplateURL = getValue(value);
}
else if ("WriterFilterName".equals(sName)) {
sWriterFilterName = getValue(value);
}
else if ("WriterFilterData".equals(sName)) {
writerFilterData = lArguments[i].Value;
}
else if ("CalcFilterName".equals(sName)) {
sCalcFilterName = getValue(value);
}
else if ("CalcFilterData".equals(sName)) {
calcFilterData = lArguments[i].Value;
}
}
// Set arguments on batch converter
batchConverter.getConfig().setOption("uplink", sUplink);
batchConverter.getConfig().setOption("directory_icon", sDirectoryIcon);
batchConverter.getConfig().setOption("document_icon", sDocumentIcon);
if (sTemplateURL!=null) {
try {
XInputStream xis = sfa2.openFileRead(sTemplateURL);
XInputStreamToInputStreamAdapter isa = new XInputStreamToInputStreamAdapter(xis);
batchConverter.readTemplate(isa);
}
catch (IOException e) {
// The batchconverter failed to read the template
}
catch (CommandAbortedException e) {
// The sfa could not execute the command
}
catch (com.sun.star.uno.Exception e) {
// Unspecified uno exception
}
}
// Convert the directory
handler.startConversion();
convertDirectory(sSourceURL, sTargetURL, getName(sSourceURL));
handler.endConversion();
}
// Convert a directory - return true if not cancelled
private boolean convertDirectory(String sSourceURL, String sTargetURL, String sHeading) {
handler.startDirectory(sSourceURL);
// Step 1: Get the directory
String[] contents;
try {
contents = sfa2.getFolderContents(sSourceURL, true);
}
catch (CommandAbortedException e) {
handler.endDirectory(sSourceURL,false);
return true;
}
catch (com.sun.star.uno.Exception e) {
handler.endDirectory(sSourceURL,false);
return true;
}
int nLen = contents.length;
IndexPageEntry[] entries = new IndexPageEntry[nLen];
// Step 2: Traverse subdirectories, if allowed
if (bRecurse) {
String sUplink = batchConverter.getConfig().getOption("uplink");
for (int i=0; i<nLen; i++) {
boolean bIsDirectory = false;
try {
bIsDirectory = sfa2.isFolder(contents[i]);
}
catch (CommandAbortedException e) {
// Considered non critical, ignore
}
catch (com.sun.star.uno.Exception e) {
// Considered non critical, ignore
}
if (bIsDirectory) {
batchConverter.getConfig().setOption("uplink","../index.html");
String sNewTargetURL = ensureSlash(sTargetURL) + getName(contents[i]);
String sNewHeading = sHeading + " - " + decodeURL(getName(contents[i]));
boolean bResult = convertDirectory(contents[i],sNewTargetURL,sNewHeading);
batchConverter.getConfig().setOption("uplink", sUplink);
if (!bResult) { return false; }
// Create entry for this subdirectory
IndexPageEntry entry = new IndexPageEntry(ensureSlash(sNewTargetURL)+"index.html",true);
entry.setDisplayName(decodeURL(getName(contents[i])));
entries[i]=entry;
}
}
}
// Step 3: Traverse documents
for (int i=0; i<nLen; i++) {
boolean bIsFile = false;
try {
bIsFile = sfa2.exists(contents[i]) && !sfa2.isFolder(contents[i]);
}
catch (CommandAbortedException e) {
// Considered non critical, ignore
}
catch (com.sun.star.uno.Exception e) {
// Considered non critical, ignore
}
if (bIsFile) {
IndexPageEntry entry = convertFile(contents[i],sTargetURL);
if (entry!=null) { entries[i]=entry; }
if (handler.cancel()) { return false; }
}
}
// Step 4: Create and write out the index file
OutputFile indexFile = batchConverter.createIndexFile(sHeading, entries);
try {
if (!sfa2.exists(sTargetURL)) { sfa2.createFolder(sTargetURL); }
}
catch (CommandAbortedException e) {
handler.endDirectory(sSourceURL,false);
return true;
}
catch (com.sun.star.uno.Exception e) {
handler.endDirectory(sSourceURL,false);
return true;
}
try {
// writeFile demands an InputStream, so we need a pipe
Object xPipeObj=xComponentContext.getServiceManager().createInstanceWithContext(
"com.sun.star.io.Pipe",xComponentContext);
XInputStream xInStream
= (XInputStream) UnoRuntime.queryInterface(XInputStream.class, xPipeObj );
XOutputStream xOutStream
= (XOutputStream) UnoRuntime.queryInterface(XOutputStream.class, xPipeObj );
OutputStream outStream = new XOutputStreamToOutputStreamAdapter(xOutStream);
// Feed the pipe with content...
indexFile.write(outStream);
outStream.flush();
outStream.close();
xOutStream.closeOutput();
// ...and then write the content to the url
sfa2.writeFile(ensureSlash(sTargetURL)+"index.html",xInStream);
}
catch (IOException e) {
handler.endDirectory(sSourceURL,false);
return true;
}
catch (NotConnectedException e) {
handler.endDirectory(sSourceURL,false);
return true;
}
catch (com.sun.star.uno.Exception e) {
handler.endDirectory(sSourceURL,false);
return true;
}
handler.endDirectory(sSourceURL, true);
return !handler.cancel();
}
private IndexPageEntry convertFile(String sSourceFileURL, String sTargetURL) {
handler.startFile(sSourceFileURL);
String sTargetFileURL = ensureSlash(sTargetURL) + getBaseName(sSourceFileURL) + ".html";
IndexPageEntry entry = new IndexPageEntry(getName(sTargetFileURL),false);
entry.setDisplayName(decodeURL(getBaseName(sTargetFileURL)));
// Load component
XComponent xDocument;
try {
Object desktop = xComponentContext.getServiceManager().createInstanceWithContext(
"com.sun.star.frame.Desktop", xComponentContext);
XComponentLoader xComponentLoader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class, desktop);
PropertyValue[] fileProps = new PropertyValue[1];
fileProps[0] = new PropertyValue();
fileProps[0].Name = "Hidden";
fileProps[0].Value = new Boolean(true);
xDocument = xComponentLoader.loadComponentFromURL(sSourceFileURL, "_blank", 0, fileProps);
}
catch (com.sun.star.io.IOException e) {
handler.endFile(sSourceFileURL,false);
return null;
}
catch (com.sun.star.uno.Exception e) {
handler.endFile(sSourceFileURL,false);
return null;
}
// Get the title and the description of the document
XDocumentProperties docProps = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xDocument).getDocumentProperties();
String loadedTitle = docProps.getTitle();
if (bUseTitle && loadedTitle.length()>0) {
entry.setDisplayName(loadedTitle);
}
String loadedDescription = docProps.getDescription();
if (bUseDescription && loadedDescription.length()>0) {
entry.setDescription(loadedDescription);
}
// Determine the type of the component
boolean bText = false;
boolean bSpreadsheet = false;
if (UnoRuntime.queryInterface(XTextDocument.class, xDocument)!=null) { bText=true; }
else if (UnoRuntime.queryInterface(XSpreadsheetDocument.class, xDocument)!=null) { bSpreadsheet=true; }
if (!bText && !bSpreadsheet) {
handler.endFile(sSourceFileURL,false);
xDocument.dispose();
return null;
}
// Convert using requested filter
boolean bHtmlSuccess = true;
PropertyHelper exportProps = new PropertyHelper();
exportProps.put("FilterName", bText ? sWriterFilterName : sCalcFilterName);
exportProps.put("Overwrite", new Boolean(true));
if (bText && writerFilterData!=null) { exportProps.put("FilterData", writerFilterData); }
if (bSpreadsheet && calcFilterData!=null) { exportProps.put("FilterData", calcFilterData); }
try {
XStorable xStore = (XStorable) UnoRuntime.queryInterface (XStorable.class, xDocument);
xStore.storeToURL (sTargetFileURL, exportProps.toArray());
}
catch (com.sun.star.io.IOException e) {
// Failed to convert; continue anyway, but don't link to the file name
entry.setFile(null);
bHtmlSuccess = false;
}
// Convet to pdf if requested
boolean bPdfSuccess = true;
if (bIncludePdf) {
PropertyValue[] pdfProps = new PropertyValue[2];
pdfProps[0] = new PropertyValue();
pdfProps[0].Name = "FilterName";
pdfProps[0].Value = bText ? "writer_pdf_Export" : "calc_pdf_Export";
pdfProps[1] = new PropertyValue();
pdfProps[1].Name = "Overwrite";
pdfProps[1].Value = new Boolean(true);
String sPdfFileURL = ensureSlash(sTargetURL) + getBaseName(sSourceFileURL) + ".pdf";
try {
XStorable xStore = (XStorable) UnoRuntime.queryInterface (XStorable.class, xDocument);
xStore.storeToURL (sPdfFileURL, pdfProps);
entry.setPdfFile(sPdfFileURL);
}
catch (com.sun.star.io.IOException e) {
// Not critical, continue without pdf
bPdfSuccess = false;
}
}
xDocument.dispose();
// Include original document if required
if (bIncludeOriginal) {
// TODO
}
// Report a failure to the user if either of the exports failed
handler.endFile(sSourceFileURL,bHtmlSuccess && bPdfSuccess);
// But return the index entry even if only one succeded
if (bHtmlSuccess || bPdfSuccess) { return entry; }
else { return null; }
}
private String getName(String sURL) {
int n = sURL.lastIndexOf("/");
return n>-1 ? sURL.substring(n+1) : sURL;
}
private String getBaseName(String sURL) {
String sName = getName(sURL);
int n = sName.lastIndexOf(".");
return n>-1 ? sName.substring(0,n) : sName;
}
private String ensureSlash(String sURL) {
return sURL.endsWith("/") ? sURL : sURL+"/";
}
private String decodeURL(String sURL) {
try {
return new URI(sURL).getPath();
}
catch (URISyntaxException e) {
return sURL;
}
}
// Implement methods from interface XTypeProvider
public com.sun.star.uno.Type[] getTypes() {
Type[] typeReturn = {};
try {
typeReturn = new Type[] {
new Type( XBatchConverter.class ),
new Type( XTypeProvider.class ),
new Type( XServiceName.class ),
new Type( XServiceInfo.class ) };
}
catch( Exception exception ) {
}
return( typeReturn );
}
public byte[] getImplementationId() {
byte[] byteReturn = {};
byteReturn = new String( "" + this.hashCode() ).getBytes();
return( byteReturn );
}
// Implement method from interface XServiceName
public String getServiceName() {
return( __serviceName );
}
// Implement methods from interface XServiceInfo
public boolean supportsService(String stringServiceName) {
return( stringServiceName.equals( __serviceName ) );
}
public String getImplementationName() {
return( __implementationName );
}
public String[] getSupportedServiceNames() {
String[] stringSupportedServiceNames = { __serviceName };
return( stringSupportedServiceNames );
}
}

View file

@ -1,72 +0,0 @@
/************************************************************************
*
* BatchHandlerAdapter.java
*
* Copyright: 2002-2008 by Henrik Just
*
* This file is part of Writer2LaTeX.
*
* Writer2LaTeX is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Writer2LaTeX is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Writer2LaTeX. If not, see <http://www.gnu.org/licenses/>.
*
* Version 1.0 (2008-10-05)
*
*/
package org.openoffice.da.comp.writer2xhtml;
import org.openoffice.da.writer2xhtml.XBatchHandler;
import w2phtml.api.BatchHandler;
/** The uno interface provides an XBatchHandler implementation, the java
* interface requires a BatchHandler implementation. This simple class
* implements the latter using an instance of the former.
*/
public class BatchHandlerAdapter implements BatchHandler {
private XBatchHandler unoHandler;
public BatchHandlerAdapter(XBatchHandler unoHandler) {
this.unoHandler = unoHandler;
}
public void startConversion() {
unoHandler.startConversion();
}
public void endConversion() {
unoHandler.endConversion();
}
public void startDirectory(String sName) {
unoHandler.startDirectory(sName);
}
public void endDirectory(String sName, boolean bSuccess) {
unoHandler.endDirectory(sName, bSuccess);
}
public void startFile(String sName) {
unoHandler.startFile(sName);
}
public void endFile(String sName, boolean bSuccess) {
unoHandler.endFile(sName, bSuccess);
}
public boolean cancel() {
return unoHandler.cancel();
}
}

View file

@ -71,12 +71,6 @@ public class W2XRegistration {
multiFactory,
regKey);
}
else if (implName.equals(BatchConverter.__implementationName) ) {
xSingleServiceFactory = FactoryHelper.getServiceFactory(BatchConverter.class,
BatchConverter.__serviceName,
multiFactory,
regKey);
}
else if (implName.equals(XhtmlOptionsDialog.__implementationName)) {
xSingleServiceFactory = FactoryHelper.getServiceFactory(XhtmlOptionsDialog.class,
XhtmlOptionsDialog.__serviceName,
@ -133,8 +127,6 @@ public class W2XRegistration {
*/
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
return
FactoryHelper.writeRegistryServiceInfo(BatchConverter.__implementationName,
BatchConverter.__serviceName, regKey) &
FactoryHelper.writeRegistryServiceInfo(Writer2xhtml.__implementationName,
Writer2xhtml.__serviceName, regKey) &
FactoryHelper.writeRegistryServiceInfo(W2XExportFilter.__implementationName,

View file

@ -1,3 +1,3 @@
#Thu Jun 25 12:58:30 CEST 2020
releaseVersion=0.5.14
releaseDate=12\:58\:30 25-06-2020
#Wed Jul 22 13:02:52 CEST 2020
releaseVersion=0.6.2
releaseDate=13\:02\:52 22-07-2020

View file

@ -0,0 +1,272 @@
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:cito="http://purl.org/spar/cito/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#"
xmlns:iph_="https://iphras.ru#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ocresd="http://purl.org/net/OCRe/study_design.owl#"
xmlns:ocrer="http://purl.org/net/OCRe/research.owl#"
xmlns:obo="http://purl.obolibrary.org/obo/"
xmlns:ts_="https://iph.ras.ru/text_structures#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:geo="http://aims.fao.org/aos/geopolitical.owl#"
xmlns:c4o="http://purl.org/spar/c4o/"
xmlns:event="http://purl.org/NET/c4dm/event.owl#"
xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:fabio="http://purl.org/spar/fabio/"
xmlns:vivo="http://vivoweb.org/ontology/core#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:vitro-public="http://vitro.mannlib.cornell.edu/ns/vitro/public#">
<owl:Ontology rdf:about="https://iph.ras.ru/text_structures">
<vitro:ontologyPrefixAnnot>ts_</vitro:ontologyPrefixAnnot>
<rdfs:label xml:lang="ru-RU">Text structures</rdfs:label>
</owl:Ontology>
<owl:Class rdf:about="https://iph.ras.ru/text_structures#elenphArticle">
<vitro:displayLimitAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>-1</vitro:displayLimitAnnot>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inClassGroup rdf:resource="http://research.iph.ras.ru/vivo/individual/vitroClassGroupTableofcontents"/>
<vitro:displayRankAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>-1</vitro:displayRankAnnot>
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:equivalentClass rdf:resource="https://iph.ras.ru/text_structures#elenphArticle"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">Electronic philosophical encyclopedia article</rdfs:label>
<rdfs:subClassOf>
<owl:Class rdf:about="https://iph.ras.ru/text_structures#TOCElement"/>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="https://iph.ras.ru/text_structures#TOCElement">
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<owl:equivalentClass rdf:resource="https://iph.ras.ru/text_structures#TOCElement"/>
<rdfs:label xml:lang="en-US">TOC Element</rdfs:label>
<vitro:displayLimitAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>-1</vitro:displayLimitAnnot>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:displayRankAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>-1</vitro:displayRankAnnot>
<obo:IAO_0000115>Table of contents element</obo:IAO_0000115>
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<vitro:inClassGroup rdf:resource="http://research.iph.ras.ru/vivo/individual/vitroClassGroupTableofcontents"/>
</owl:Class>
<owl:Class rdf:about="https://iph.ras.ru/text_structures#textExcerpt">
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:equivalentClass rdf:resource="https://iph.ras.ru/text_structures#textExcerpt"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">Text excerpt</rdfs:label>
<vitro:inClassGroup rdf:resource="http://research.iph.ras.ru/vivo/individual/vitroClassGroupTableofcontents"/>
</owl:Class>
<owl:Class rdf:about="https://iph.ras.ru/text_structures#elenphExcerpt">
<owl:equivalentClass rdf:resource="https://iph.ras.ru/text_structures#elenphExcerpt"/>
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<vitro:displayLimitAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>-1</vitro:displayLimitAnnot>
<rdfs:label xml:lang="en-US">Elenph Excerpt</rdfs:label>
<vitro:displayRankAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>-1</vitro:displayRankAnnot>
<vitro:inClassGroup rdf:resource="http://research.iph.ras.ru/vivo/individual/vitroClassGroupTableofcontents"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subClassOf rdf:resource="https://iph.ras.ru/text_structures#textExcerpt"/>
</owl:Class>
<owl:ObjectProperty rdf:about="https://iph.ras.ru/text_structures#hasTOCItem">
<rdfs:label xml:lang="en-US">has TOC item</rdfs:label>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#TOCElement"/>
<rdfs:range rdf:resource="https://iph.ras.ru/text_structures#TOCItem"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#hasTOCItem"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:selectFromExistingAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</vitro:selectFromExistingAnnot>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topObjectProperty"/>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#firstPublication">
<rdfs:label xml:lang="en-US">First publication</rdfs:label>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphArticle"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#firstPublication"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#yearAndMonth">
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphArticle"/>
<rdfs:label xml:lang="en-US">Year and month</rdfs:label>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#gYearMonth"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#yearAndMonth"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#works">
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#works"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphExcerpt"/>
<rdfs:label xml:lang="en-US">Works</rdfs:label>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#bibliography">
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#bibliography"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphExcerpt"/>
<rdfs:label xml:lang="en-US">bibliography</rdfs:label>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#htmlExcerpt">
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#textExcerpt"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#htmlExcerpt"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:editing>HTML</vitro:editing>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">html Excerpt</rdfs:label>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#issue">
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#issue"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:label xml:lang="en-US">Issue</rdfs:label>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphArticle"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#">
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">htmlExcerpt</rdfs:label>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#Excerpt"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#affiliation">
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">Affiliation</rdfs:label>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphExcerpt"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#affiliation"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#author">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#author"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">author</rdfs:label>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphExcerpt"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#keywords">
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#keywords"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphExcerpt"/>
<rdfs:label xml:lang="en-US">Keywords</rdfs:label>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="https://iph.ras.ru/text_structures#doi">
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#doi"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:label xml:lang="en-US">DOI</rdfs:label>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphArticle"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
</owl:DatatypeProperty>
<owl:FunctionalProperty rdf:about="https://iph.ras.ru/text_structures#pointsTo">
<rdfs:label xml:lang="en-US">points to</rdfs:label>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:range rdf:resource="https://iph.ras.ru/text_structures#TOCElement"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topObjectProperty"/>
<vitro:selectFromExistingAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</vitro:selectFromExistingAnnot>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#pointsTo"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#TOCItem"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:about="https://iph.ras.ru/text_structures#hasText">
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#TOCElement"/>
<rdfs:range rdf:resource="https://iph.ras.ru/text_structures#Excerpt"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topObjectProperty"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<vitro:selectFromExistingAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</vitro:selectFromExistingAnnot>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:label xml:lang="en-US">has text</rdfs:label>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#hasText"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:about="https://iph.ras.ru/text_structures#itemNumber">
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#itemNumber"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:label xml:lang="en-US">Item Number</rdfs:label>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#TOCItem"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:about="https://iph.ras.ru/text_structures#year">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#gYear"/>
<vitro:inPropertyGroupAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/default#n6578"/>
<rdfs:label xml:lang="en-US">Year</rdfs:label>
<vitro:hiddenFromPublishBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:prohibitedFromUpdateBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<vitro:hiddenFromDisplayBelowRoleLevelAnnot rdf:resource="http://vitro.mannlib.cornell.edu/ns/vitro/role#public"/>
<rdfs:subPropertyOf rdf:resource="https://iph.ras.ru/text_structures#year"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
<rdfs:subPropertyOf rdf:resource="http://www.w3.org/2002/07/owl#topDataProperty"/>
<rdfs:domain rdf:resource="https://iph.ras.ru/text_structures#elenphArticle"/>
</owl:FunctionalProperty>
</rdf:RDF>

View file

@ -57,13 +57,18 @@ public class ODFPageSplitter {
if (indexFirstPart != null) {
onode.insertBefore(indexFirstPart, child);
}
} else if (nodeName.equals(TEXT_SECTION)) {
} else if (nodeName.equals(TEXT_ILLUSTRATION_INDEX)) {
Node indexFirstPart = splitTextIllustrationIndex(child);
if (indexFirstPart != null) {
onode.insertBefore(indexFirstPart, child);
}
}else if (nodeName.equals(TEXT_SECTION)) {
Node sectionFirstPart = handleSection(child);
if (sectionFirstPart != null) {
onode.insertBefore(sectionFirstPart, child);
style = ofr.getSectionStyle(Misc.getAttribute(child, TEXT_SECTION));
}
} else if (nodeName.equals(TEXT_TABLE_OF_CONTENT)){
} else if (nodeName.equals(TEXT_TABLE_OF_CONTENT)){
//HACK
containsSPB(childFirstPart);
i++;
@ -73,6 +78,7 @@ public class ODFPageSplitter {
i++;
continue;
} else {
System.out.println("In ODFPageSplitter unknown node found. Error, exiting.");
Debug.printNode(child);
System.exit(1);
@ -101,6 +107,24 @@ public class ODFPageSplitter {
//Debug.printNode(onode);
return onode;
}
private static Node splitTextIllustrationIndex(Node illustrationIndex) {
Node illustrationIndexFirstPart = illustrationIndex.cloneNode(false);
NodeList childs = illustrationIndex.getChildNodes();
int i = 0;
while (childs.getLength() > i) {
Node child = childs.item(i);
String childName = child.getNodeName();
if (childName.equals(TEXT_ILLUSTRATION_INDEX_SOURCE)) {
illustrationIndexFirstPart.appendChild(child.cloneNode(true));
} else
if (childName.equals(TEXT_INDEX_BODY)) {
Node indexBodyFirstPart = splitTextIndexBody(child);
illustrationIndexFirstPart.appendChild(indexBodyFirstPart);
}
i++;
}
return illustrationIndexFirstPart;
}
private static Node splitABIndex(Node abIndex) {
Node abIndexFirstPart = abIndex.cloneNode(false);
NodeList childs = abIndex.getChildNodes();

View file

@ -3,7 +3,7 @@
<identifier value="pro.litvinovg.writer2paginatedhtml"/>
<version value="0.5.14"/>
<version value="0.6.2"/>
<dependencies>
<OpenOffice.org-minimal-version d:name="OpenOffice.org 3.0" value="3.0"/>