public abstract class PrefixedRootFactory extends java.lang.Object implements ReferenceFactory
jr://media/checkmark.pngand a PrefixedRootFactory with roots "file" and "file://" will be used by the ReferenceManager to derive any URI with the roots
jr://file/myxform.xhtmlor
file://myxform.xhtml
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String[] |
roots |
Constructor and Description |
---|
PrefixedRootFactory(java.lang.String[] roots)
Construct a PrefixedRootFactory which handles the roots
provided.
|
Modifier and Type | Method and Description |
---|---|
Reference |
derive(java.lang.String URI) |
Reference |
derive(java.lang.String URI,
java.lang.String context) |
boolean |
derives(java.lang.String URI) |
protected abstract Reference |
factory(java.lang.String terminal,
java.lang.String URI)
Creates a Reference using the most locally available part of a
URI.
|
public PrefixedRootFactory(java.lang.String[] roots)
roots
- The roots of URI's which should be derived by
this factory.public Reference derive(java.lang.String URI) throws InvalidReferenceException
derive
in interface ReferenceFactory
InvalidReferenceException
protected abstract Reference factory(java.lang.String terminal, java.lang.String URI)
terminal
- The local part of the URI for this prefixed root
(excluding the root itself)URI
- The full URIpublic Reference derive(java.lang.String URI, java.lang.String context) throws InvalidReferenceException
derive
in interface ReferenceFactory
InvalidReferenceException
public boolean derives(java.lang.String URI)
derives
in interface ReferenceFactory