Verified Owner
Top Fields Constructors Methods
org.jabref.logic.openoffice

public final Class ZoteroDocumentPreferences

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.io.IOException, .Reader, .StringWriter, java.util.ArrayList, .List, .Optional, javax.xml.parsers.DocumentBuilder, .DocumentBuilderFactory, .ParserConfigurationException, javax.xml.transform.OutputKeys, .Transformer, .TransformerException, .TransformerFactory, javax.xml.transform.dom.DOMSource, javax.xml.transform.stream.StreamResult, org.jabref.logic.citationstyle.CitationStyle, org.jabref.model.openoffice.uno.UnoUserDefinedProperty, com.sun.star.beans.IllegalTypeException, com.sun.star.beans.NotRemoveableException, com.sun.star.beans.PropertyVetoException, com.sun.star.lang.WrappedTargetException, com.sun.star.text.XTextDocument, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory, org.w3c.dom.Document, .Element, .Node, org.xml.sax.InputSource, .SAXException

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final Logger
private static final int
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Document
buildXmlDocument(String serializedData)

private static String
createOrUpdatePrefWithStyleId(String serializedData, String styleId)

public static Optional<CitationStyle>
findCitationStyle(com.sun.star.text.XTextDocument document, List<CitationStyle> availableStyles)

pack-priv static Optional<String>
findStyleId(String serializedData)

private static Optional<Integer>
getChunkIndex(String propertyName, String existingProperty)

private static Element
private static Optional<String>
readChunkedProperty(com.sun.star.text.XTextDocument document, String propertyName)

private static Optional<String>
readSerializedData(com.sun.star.text.XTextDocument document)

private static void
removeTrailingChunks(com.sun.star.text.XTextDocument document, String propertyName, int lastChunkIndex)

private static String
public static boolean
writeCitationStyle(com.sun.star.text.XTextDocument document, CitationStyle citationStyle)

private static void
writeProperty(com.sun.star.text.XTextDocument document, String propertyName, String value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CSL_PREFback to summary
private static final String CSL_PREF
EMPTY_XML_DOCUMENT_DATAback to summary
private static final String EMPTY_XML_DOCUMENT_DATA
LOGGERback to summary
private static final Logger LOGGER
MAX_LENGTHback to summary
private static final int MAX_LENGTH
STYLEback to summary
private static final String STYLE
STYLE_IDback to summary
private static final String STYLE_ID
ZOTERO_PREFback to summary
private static final String ZOTERO_PREF

Constructor Detail

ZoteroDocumentPreferencesback to summary
private ZoteroDocumentPreferences()

Method Detail

buildXmlDocumentback to summary
private static Document buildXmlDocument(String serializedData) throws IOException
createOrUpdatePrefWithStyleIdback to summary
private static String createOrUpdatePrefWithStyleId(String serializedData, String styleId) throws IOException
findCitationStyleback to summary
public static Optional<CitationStyle> findCitationStyle(com.sun.star.text.XTextDocument document, List<CitationStyle> availableStyles) throws com.sun.star.lang.WrappedTargetException
findStyleIdback to summary
pack-priv static Optional<String> findStyleId(String serializedData)
getChunkIndexback to summary
private static Optional<Integer> getChunkIndex(String propertyName, String existingProperty)
getOrCreateXmlStyleElementback to summary
private static Element getOrCreateXmlStyleElement(Document document) throws IOException
readChunkedPropertyback to summary
private static Optional<String> readChunkedProperty(com.sun.star.text.XTextDocument document, String propertyName) throws com.sun.star.lang.WrappedTargetException
readSerializedDataback to summary
private static Optional<String> readSerializedData(com.sun.star.text.XTextDocument document) throws com.sun.star.lang.WrappedTargetException
removeTrailingChunksback to summary
private static void removeTrailingChunks(com.sun.star.text.XTextDocument document, String propertyName, int lastChunkIndex) throws com.sun.star.beans.NotRemoveableException
serializeXmlDocumentback to summary
private static String serializeXmlDocument(Document document) throws IOException
writeCitationStyleback to summary
public static boolean writeCitationStyle(com.sun.star.text.XTextDocument document, CitationStyle citationStyle) throws com.sun.star.beans.IllegalTypeException, com.sun.star.beans.NotRemoveableException, com.sun.star.beans.PropertyVetoException, com.sun.star.lang.WrappedTargetException
writePropertyback to summary
private static void writeProperty(com.sun.star.text.XTextDocument document, String propertyName, String value) throws com.sun.star.beans.IllegalTypeException, com.sun.star.beans.NotRemoveableException, com.sun.star.beans.PropertyVetoException, com.sun.star.lang.WrappedTargetException