public class ImportMapping extends Object implements Iterable<ImportObject>
ImportSpec
.
This is a convenient and performant adaptor for the part of an ImportSpec
that is merely a list of ImportObject
s. It is used, e.g., by the
ConfigurableXMLRewriter
.
Clients can load an import mapping from
an ImportSpec (that can be loaded from a file using JAXB), or they can build
a mapping from scratch by calling the ImportMapping()
constructor
and then adding ImportObject
s or
using the plain add(URI, URI, URI, RewriteMethod)
method
to add entries from scratch.
ImportMappings can be converted to import specs which can then be serialized to XML via JAXB.
Constructor and Description |
---|
ImportMapping() |
ImportMapping(ImportSpec importSpec)
Initialize an import mapping from a spec that has been loaded.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ImportMapping(ImportSpec importSpec)
public ImportMapping()
public ImportObject getImportObjectForTextGridURI(String textGridURI)
getImportObjectForTextGridURI(URI)
insteadpublic ImportObject getImportObjectForTextGridURI(URI textGridURI)
public ImportObject getImportObjectForLocalURI(String localURI)
getImportObjectForLocalURI(URI)
insteadmakeURI(String)
public ImportObject getImportObjectForLocalURI(URI localURI)
public void add(ImportObject... importObjects)
public static URI makeURI(String in) throws IllegalArgumentException
IllegalArgumentException
public ImportMapping add(String textgridURI, String localURI, String localMetadata, RewriteMethod rewriteMethod)
add(URI,URI,URI,RewriteMethod)
insteadImportObject
on the fly and add it.public ImportMapping add(URI textgridURI, URI localURI, URI localMetadata, RewriteMethod rewriteMethod)
ImportObject
on the fly and add it.public Collection<? extends ImportObject> getImportObjects()
public Iterator<ImportObject> iterator()
iterator
in interface Iterable<ImportObject>
public ImportSpec toImportSpec()
public RevisionPolicyType getImportRevisionPolicy()
Copyright © 2018 TextGrid. All rights reserved.