org.deegree.gml
Class GMLReference<T extends GMLObject>

java.lang.Object
  extended by org.deegree.gml.GMLReference<T>
Type Parameters:
T - type of the referenced object
All Implemented Interfaces:
TypedObjectNode, GMLObject
Direct Known Subclasses:
FeatureReference, GeometryReference

public class GMLReference<T extends GMLObject>
extends java.lang.Object
implements GMLObject

Represents a reference to a GMLObject, corresponds to a GML property with an xlink:href attribute.

Version:
$Revision: 27043 $, $Date: 2010-09-28 09:21:51 +0200 (Di, 28. Sep 2010) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
GMLReference(GMLReferenceResolver resolver, java.lang.String uri, java.lang.String baseURL)
          Creates a new GMLReference instance.
 
Method Summary
 GMLStdProps getGMLProperties()
          Returns the standard GML properties (e.g.
 java.lang.String getId()
          Returns the id of the object.
 T getReferencedObject()
          Returns the referenced GMLObject instance (may trigger resolving and fetching it).
 java.lang.String getURI()
          Returns the URI of the object.
 boolean isLocal()
           
 boolean isResolved()
          Returns whether the reference has been resolved.
 void resolve(T object)
          Sets the referenced object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLReference

public GMLReference(GMLReferenceResolver resolver,
                    java.lang.String uri,
                    java.lang.String baseURL)
Creates a new GMLReference instance.

Parameters:
resolver - used for resolving the reference, must not be null
uri - the object's uri, must not be null
baseURL - base URL for resolving the uri, may be null (no resolving of relative URLs)
Method Detail

getURI

public java.lang.String getURI()
Returns the URI of the object.

Returns:
the URI of the object, never null

isResolved

public boolean isResolved()
Returns whether the reference has been resolved.

Returns:
true, if the reference has been resolved, false otherwise

isLocal

public boolean isLocal()

resolve

public void resolve(T object)
Sets the referenced object.

Parameters:
object - the referenced object, may be null

getReferencedObject

public T getReferencedObject()
                                        throws ReferenceResolvingException
Returns the referenced GMLObject instance (may trigger resolving and fetching it).

Returns:
the referenced GMLObject instance
Throws:
ReferenceResolvingException - if the reference cannot be resolved

getId

public java.lang.String getId()
Description copied from interface: GMLObject
Returns the id of the object.

Specified by:
getId in interface GMLObject
Returns:
the id of the object, or null if it doesn't have an id

getGMLProperties

public GMLStdProps getGMLProperties()
Description copied from interface: GMLObject
Returns the standard GML properties (e.g. gml:name).

Specified by:
getGMLProperties in interface GMLObject
Returns:
the standard GML properties, may be


Copyright © 2011. All Rights Reserved.