java.lang.Object
org.openprovenance.prov.model.DOMProcessing
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringconvertNsFromXml(String uri) static StringconvertNsToXml(String uri) static final ElementmarshalAttribute(Attribute attribute) static final ElementmarshalTypedValue(TypedValue attribute, QualifiedName elementName) static final ElementnewElement(QualifiedName elementName, String value, QualifiedName type) Creates a DOMElementfor aQualifiedNameand content given by value and typestatic final ElementnewElement(QualifiedName qualifiedName, String value, QualifiedName type, String lang) static ElementnewElement(QualifiedName elementName, QualifiedName value) Creates a DOMElementfor aQualifiedNameand content given by valuestatic final ElementnewElement(QualifiedName name, Element value) static StringqualifiedNameToString(QName name) static StringstringToQualifiedName(String str, Element el) Converts a string to a QualifiedName, extracting namespace from the DOM.static voidfinal AttributeunmarshallAttribute(Element el, ProvFactory pFactory, ValueConverter vconv) static voidwriteDOMToPrinter(Node document, Writer out, boolean formatted) static voidwriteDOMToPrinter(Node document, StreamResult result, boolean formatted) static StringwriteToString(Node toWrite)
-
Field Details
-
XSD_NS_FOR_XML
- See Also:
-
builder
-
-
Constructor Details
-
DOMProcessing
-
-
Method Details
-
qualifiedNameToString
-
qualifiedNameToString
-
stringToQualifiedName
Converts a string to a QualifiedName, extracting namespace from the DOM. Ensures that the generated qualified name is properly escaped, according to PROV-N syntax.- Parameters:
str- string to convert to QualifiedNameel- current Element in which this string was found (as attribute or attribute value)- Returns:
- a qualified name
QualifiedName
-
convertNsToXml
-
convertNsFromXml
-
newElement
Creates a DOMElementfor aQualifiedNameand content given by value- Parameters:
elementName- aQualifiedNameto denote the element namevalue- for the createdElement- Returns:
- a new
Element
-
newElement
Creates a DOMElementfor aQualifiedNameand content given by value and type- Parameters:
elementName- aQualifiedNameto denote the element namevalue- for the createdElementtype- of the value- Returns:
- a new
Element
-
newElement
public static final Element newElement(QualifiedName qualifiedName, String value, QualifiedName type, String lang) -
newElement
-
writeDOMToPrinter
public static void writeDOMToPrinter(Node document, StreamResult result, boolean formatted) throws TransformerConfigurationException, TransformerException -
writeDOMToPrinter
public static void writeDOMToPrinter(Node document, Writer out, boolean formatted) throws TransformerConfigurationException, TransformerException -
writeToString
public static String writeToString(Node toWrite) throws TransformerConfigurationException, TransformerException -
trimNode
-
marshalAttribute
-
marshalTypedValue
-
unmarshallAttribute
-