public class ITSStandoffManager extends Object
| Constructor and Description |
|---|
ITSStandoffManager()
Use default in-memory HashMap of ITS standoff annotations.
|
ITSStandoffManager(IITSDataStore dataStore)
Use specified storage for ITS standoff annotations.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends GenericAnnotations> |
addLQIAnnotation(T anns,
String uri)
Resolve a LQI reference using the specified URI and add it to the
specified annotations.
|
<T extends GenericAnnotations> |
addProvAnnotation(T anns,
String uri)
Resolve a provenance reference using the specified URI and add it to
the specified annotations.
|
boolean |
alreadyParsed(String resource)
Check if the named resource has already been parsed for ITS metadata.
|
IITSDataStore |
getDataStore() |
Collection<String> |
getStoredLQIRefs() |
Collection<String> |
getStoredProvRefs() |
void |
parseXLIFF(XMLEventReader reader,
String resource,
String encoding)
Saves input reader into a temporary file and returns a reference for
additional parsing of the same content.
|
public ITSStandoffManager()
public ITSStandoffManager(IITSDataStore dataStore)
public void parseXLIFF(XMLEventReader reader, String resource, String encoding) throws XMLStreamException
reader - the reader for the document to parse.resource - an IRI reference without the fragment part.encoding - the encoding to use for the output.XMLStreamExceptionpublic <T extends GenericAnnotations> void addLQIAnnotation(T anns, String uri)
anns - annotations where to add.uri - URI of the reference.public <T extends GenericAnnotations> void addProvAnnotation(T anns, String uri)
anns - the annotations where to add.uri - URI of the reference.public boolean alreadyParsed(String resource)
resource - An IRI reference without the fragment partpublic Collection<String> getStoredLQIRefs()
public Collection<String> getStoredProvRefs()
public final IITSDataStore getDataStore()
Copyright © 2021. All rights reserved.