public class JPhyloIOWritingUtils extends Object
Constructor and Description |
---|
JPhyloIOWritingUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
writeCharSequencePartContent(JPhyloIOEventReceiver receiver,
long startColumn,
long endColumn,
CharSequence source) |
static void |
writeListSequencePartContent(JPhyloIOEventReceiver receiver,
long startColumn,
long endColumn,
List<?> source) |
static void |
writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
QName predicate,
QName originalType,
Object objectValue)
Writes an event subsequence modeling a literal metadata annotation with a simple value.
|
static void |
writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
QName predicate,
QName originalType,
Object objectValue,
String stringRepresentation)
Writes an event subsequence modeling a literal metadata annotation with a simple value.
|
static void |
writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
URIOrStringIdentifier predicate,
URIOrStringIdentifier originalType,
Object objectValue,
String stringRepresentation)
Writes an event subsequence modeling a literal metadata annotation with a simple value.
|
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
QName rel,
URI hRef)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
QName rel,
URI hRef,
String about)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
URIOrStringIdentifier rel,
URI hRef)
Writes a
ResourceMetadataEvent and its respective end event to the specified receiver. |
static void |
writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver,
String id,
String label,
URIOrStringIdentifier rel,
URI hRef,
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, CharSequence source) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
public static void writeListSequencePartContent(JPhyloIOEventReceiver receiver, long startColumn, long endColumn, List<?> source) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
public static void writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver, String id, String label, URIOrStringIdentifier predicate, URIOrStringIdentifier originalType, Object objectValue, String stringRepresentation) throws 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 writtenIOException
- if an I/O exception is thrown by receiver
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, QName, QName, Object, String)
,
LiteralMetadataEvent
,
LiteralMetadataContentEvent
,
LiteralContentSequenceType.SIMPLE
public static void writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver, String id, String label, QName predicate, QName originalType, Object objectValue, String stringRepresentation) throws IOException
LiteralContentSequenceType.SIMPLE
. In contrast to
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String)
this convenience method accepts QName
s instead of URIOrStringIdentifier
s 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 writtenIOException
- if an I/O exception is thrown by receiver
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String)
,
LiteralMetadataEvent
,
LiteralMetadataContentEvent
,
LiteralContentSequenceType.SIMPLE
public static void writeSimpleLiteralMetadata(JPhyloIOEventReceiver receiver, String id, String label, QName predicate, QName originalType, Object objectValue) throws IOException
LiteralContentSequenceType.SIMPLE
. In contrast to
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String)
this convenience method accepts QName
s instead of URIOrStringIdentifier
s 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 writtenIOException
- if an I/O exception is thrown by receiver
writeSimpleLiteralMetadata(JPhyloIOEventReceiver, String, String, URIOrStringIdentifier, URIOrStringIdentifier, Object, String)
,
LiteralMetadataEvent
,
LiteralMetadataContentEvent
,
LiteralContentSequenceType.SIMPLE
public static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, String id, String label, URIOrStringIdentifier rel, URI hRef, String about) throws 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
.)NullPointerException
- if id
or rel
are null
IllegalArgumentException
- if the specified ID is not a valid
NCNameIOException
- if an I/O error occurs when writing to the specified receiverpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, String id, String label, URIOrStringIdentifier rel, URI hRef) throws 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 elementNullPointerException
- if id
or rel
are null
IllegalArgumentException
- if the specified ID is not a valid
NCNameIOException
- if an I/O error occurs when writing to the specified receiverpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, String id, String label, QName rel, URI hRef, String about) throws 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
.)NullPointerException
- if id
or rel
are null
IllegalArgumentException
- if the specified ID is not a valid
NCNameIOException
- if an I/O error occurs when writing to the specified receiverpublic static void writeTerminalResourceMetadata(JPhyloIOEventReceiver receiver, String id, String label, QName rel, URI hRef) throws 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 elementNullPointerException
- if id
or rel
are null
IllegalArgumentException
- if the specified ID is not a valid
NCNameIOException
- if an I/O error occurs when writing to the specified receiver