|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.gml.GMLDocumentIdContext
public class GMLDocumentIdContext
Keeps track of GMLObject
s inside GML instance documents, their ids and local xlink references during the
parsing of GML documents.
Can be used for resolving local xlink-references at the end of the parsing process of a GML instance document or to access all encountered objects on any level of the document.
GMLReferenceResolver
,
GMLStreamReader
Constructor Summary | |
---|---|
GMLDocumentIdContext(GMLVersion version)
Creates a new GMLDocumentIdContext instance for a GML document of the given version. |
Method Summary | |
---|---|
void |
addObject(GMLObject object)
Adds a new GMLObject that has been encountered during the parsing of the GML document. |
void |
addReference(GMLReference<?> ref)
Adds a new GMLReference that has been encountered during the parsing of the GML document. |
GMLObject |
getObject(String id)
Returns the GMLObject with the specified id. |
GMLObject |
getObject(String uri,
String baseURL)
Returns the GMLObject that is referenced by the given URI. |
Map<String,GMLObject> |
getObjects()
Returns all GMLObject (but no GMLReference instances) that have been added. |
List<GMLReference<?>> |
getReferences()
Return all GMLReference instances that have been added. |
void |
resolveLocalRefs()
Resolves all local references that have been added before against the added objects. |
void |
setApplicationSchema(ApplicationSchema schema)
Sets the application schema (necessary for getObject(String, String) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GMLDocumentIdContext(GMLVersion version)
GMLDocumentIdContext
instance for a GML document of the given version.
version
- GML version, must not be null
Method Detail |
---|
public void setApplicationSchema(ApplicationSchema schema)
getObject(String, String)
.
schema
- application schema to use for parsing external referencespublic void addObject(GMLObject object)
GMLObject
that has been encountered during the parsing of the GML document.
object
- GML object, must not be null
and must not be of type GMLReference
public void addReference(GMLReference<?> ref)
GMLReference
that has been encountered during the parsing of the GML document.
ref
- GML reference, must not be null
public GMLObject getObject(String id)
GMLObject
with the specified id.
id
- id of the object to be returned
null
if it has not been added beforepublic Map<String,GMLObject> getObjects()
GMLObject
(but no GMLReference
instances) that have been added.
null
public List<GMLReference<?>> getReferences()
GMLReference
instances that have been added.
null
public GMLObject getObject(String uri, String baseURL)
GMLReferenceResolver
GMLObject
that is referenced by the given URI.
getObject
in interface GMLReferenceResolver
uri
- URI that identifies the object, must not be null
baseURL
- optional baseURL for resolving URIs that are relative URLs, may be null
null
if no such object existspublic void resolveLocalRefs() throws ReferenceResolvingException
ReferenceResolvingException
- if a local reference cannot be resolved
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |