| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.gml.GMLDocumentIdContext
public class GMLDocumentIdContext
Keeps track of GMLObjects 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 GMLDocumentIdContextinstance for a GML document of the given version. | |
| Method Summary | |
|---|---|
|  void | addObject(GMLObject object)Adds a new GMLObjectthat has been encountered during the parsing of the GML document. | 
|  void | addReference(GMLReference<?> ref)Adds a new GMLReferencethat has been encountered during the parsing of the GML document. | 
|  GMLObject | getObject(String id)Returns the GMLObjectwith the specified id. | 
|  GMLObject | getObject(String uri,
          String baseURL)Returns the GMLObjectthat is referenced by the given URI. | 
|  Map<String,GMLObject> | getObjects()Returns all GMLObject(but noGMLReferenceinstances) that have been added. | 
|  List<GMLReference<?>> | getReferences()Return all GMLReferenceinstances that have been added. | 
|  void | resolveLocalRefs()Resolves all local references that have been added before against the added objects. | 
|  void | setApplicationSchema(AppSchema 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(AppSchema 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 GMLReferencepublic void addReference(GMLReference<?> ref)
GMLReference that has been encountered during the parsing of the GML document.
ref - GML reference, must not be nullpublic 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.
nullpublic List<GMLReference<?>> getReferences()
GMLReference instances that have been added.
null
public GMLObject getObject(String uri,
                           String baseURL)
GMLReferenceResolverGMLObject that is referenced by the given URI.
getObject in interface GMLReferenceResolvergetObject in interface ReferenceResolveruri - URI that identifies the object, must not be nullbaseURL - optional baseURL for resolving URIs that are relative URLs, may be null
null if no such object exists
public void resolveLocalRefs()
                      throws ReferenceResolvingException
ReferenceResolvingException - if a local reference cannot be resolved| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||