public class JPhyloIOWritingUtils extends java.lang.Object
| Constructor and Description |
|---|
JPhyloIOWritingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
writeCharSequencePartContent(JPhyloIOEventReceiver receiver,
long startColumn,
long endColumn,
java.lang.CharSequence source) |
static void |
writeListSequencePartContent(JPhyloIOEventReceiver receiver,
long startColumn,
long endColumn,
java.util.List<?> source) |
static void |
writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
javax.xml.namespace.QName predicate,
javax.xml.namespace.QName originalType,
java.lang.Object objectValue)
Writes an event subsequence modeling a literal metadata annotation with a simple value.
|
static void |
writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
javax.xml.namespace.QName predicate,
javax.xml.namespace.QName originalType,
java.lang.Object objectValue,
java.lang.String stringRepresentation)
Writes an event subsequence modeling a literal metadata annotation with a simple value.
|
static void |
writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
URIOrStringIdentifier predicate,
URIOrStringIdentifier originalType,
java.lang.Object objectValue,
java.lang.String stringRepresentation)
Writes an event subsequence modeling a literal metadata annotation with a simple value.
|
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
javax.xml.namespace.QName rel,
java.net.URI hRef)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
javax.xml.namespace.QName rel,
java.net.URI hRef,
java.lang.String about)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
URIOrStringIdentifier rel,
java.net.URI hRef)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
java.lang.String id,
java.lang.String label,
URIOrStringIdentifier rel,
java.net.URI hRef,
java.lang.String about)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
public JPhyloIOWritingUtils()
public static void writeCharSequencePartContent(JPhyloIOEventReceiver receiver, long startColumn, long endColumn, java.lang.CharSequence source) throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOExceptionjava.lang.IllegalArgumentExceptionpublic static void writeListSequencePartContent(JPhyloIOEventReceiver receiver, long startColumn, long endColumn, java.util.List<?> source) throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOExceptionjava.lang.IllegalArgumentExceptionpublic static void writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, URIOrStringIdentifier predicate, URIOrStringIdentifier originalType, java.lang.Object objectValue, java.lang.String stringRepresentation) throws java.io.IOException
LiteralContentSequenceType.SIMPLE.
This tool method can be useful in an application's implementation of a data adapter providing metadata.
receiver - the event receiver to write the event sequence toid - the ID of the literal metadata start event to be writtenlabel - the label of the literal metadata start event to be writtenpredicate - the predicate of the literal metadata start event to be writtenoriginalType - the type of the literal metadata start event to be writtenobjectValue - the object value of the literal metadata content event to be writtenstringRepresentation - the string value of the literal metadata content event to be writtenjava.io.IOException - if an I/O exception is thrown by receiverwriteSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, QName, QName, Object, String),
LiteralMetadataEvent,
LiteralMetadataContentEvent,
LiteralContentSequenceType.SIMPLEpublic static void writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, javax.xml.namespace.QName predicate, javax.xml.namespace.QName originalType, java.lang.Object objectValue, java.lang.String stringRepresentation) throws java.io.IOException
LiteralContentSequenceType.SIMPLE. In contrast to
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String)
this convenience method accepts QNames instead of URIOrStringIdentifiers as the predicate and original type
and will assume null for the respective string keys.
This tool method can be useful in an application's implementation of a data adapter providing metadata.
receiver - the event receiver to write the event sequence toid - the ID of the literal metadata start event to be writtenlabel - the label of the literal metadata start event to be writtenpredicate - the predicate of the literal metadata start event to be writtenoriginalType - the type of the literal metadata start event to be writtenobjectValue - the object value of the literal metadata content event to be writtenstringRepresentation - the string value of the literal metadata content event to be writtenjava.io.IOException - if an I/O exception is thrown by receiverwriteSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String),
LiteralMetadataEvent,
LiteralMetadataContentEvent,
LiteralContentSequenceType.SIMPLEpublic static void writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, javax.xml.namespace.QName predicate, javax.xml.namespace.QName originalType, java.lang.Object objectValue) throws java.io.IOException
LiteralContentSequenceType.SIMPLE. In contrast to
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String)
this convenience method accepts QNames instead of URIOrStringIdentifiers as the predicate and original type
and will assume null for the respective string keys. Compared to
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, QName, QName, Object, String) this method also
omits the value's string representation and assumes null for it.
This tool method can be useful in an application's implementation of a data adapter providing metadata.
receiver - the event receiver to write the event sequence toid - the ID of the literal metadata start event to be writtenlabel - the label of the literal metadata start event to be writtenpredicate - the predicate of the literal metadata start event to be writtenoriginalType - the type of the literal metadata start event to be writtenobjectValue - the object value of the literal metadata content event to be writtenjava.io.IOException - if an I/O exception is thrown by receiverwriteSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String),
LiteralMetadataEvent,
LiteralMetadataContentEvent,
LiteralContentSequenceType.SIMPLEpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, URIOrStringIdentifier rel, java.net.URI hRef, java.lang.String about) throws java.io.IOException
ResourceMetadataEvent and its respective end event to the specified receiver.receiver - the receiver to write the events toid - the unique ID associated with the represented data element (Must be a valid
NCName.)label - a label associated with the represented data element (Maybe null.)rel - the RDF rel URI of this elementhRef - the RDF hRef URI of this elementabout - the content of a specific about attribute to be written on the according XML representation of this element
(Maybe null.)java.lang.NullPointerException - if id or rel are nulljava.lang.IllegalArgumentException - if the specified ID is not a valid
NCNamejava.io.IOException - if an I/O error occurs when writing to the specified receiverpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, URIOrStringIdentifier rel, java.net.URI hRef) throws java.io.IOException
ResourceMetadataEvent and its respective end event to the specified receiver.receiver - the receiver to write the events toid - the unique ID associated with the represented data element (Must be a valid
NCName.)label - a label associated with the represented data element (Maybe null.)rel - the RDF rel URI of this elementhRef - the RDF hRef URI of this elementjava.lang.NullPointerException - if id or rel are nulljava.lang.IllegalArgumentException - if the specified ID is not a valid
NCNamejava.io.IOException - if an I/O error occurs when writing to the specified receiverpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, javax.xml.namespace.QName rel, java.net.URI hRef, java.lang.String about) throws java.io.IOException
ResourceMetadataEvent and its respective end event to the specified receiver.
The string representations of rel will be set to null.receiver - the receiver to write the events toid - the unique ID associated with the represented data element (Must be a valid
NCName.)label - a label associated with the represented data element (Maybe null.)rel - the RDF rel URI of this elementhRef - the RDF hRef URI of this elementabout - the content of a specific about attribute to be written on the according XML representation of this element
(Maybe null.)java.lang.NullPointerException - if id or rel are nulljava.lang.IllegalArgumentException - if the specified ID is not a valid
NCNamejava.io.IOException - if an I/O error occurs when writing to the specified receiverpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, java.lang.String id, java.lang.String label, javax.xml.namespace.QName rel, java.net.URI hRef) throws java.io.IOException
ResourceMetadataEvent and its respective end event to the specified receiver.
The string representations of rel will be set to null.receiver - the receiver to write the events toid - the unique ID associated with the represented data element (Must be a valid
NCName.)label - a label associated with the represented data element (Maybe null.)rel - the RDF rel URI of this elementhRef - the RDF hRef URI of this elementjava.lang.NullPointerException - if id or rel are nulljava.lang.IllegalArgumentException - if the specified ID is not a valid
NCNamejava.io.IOException - if an I/O error occurs when writing to the specified receiver