Interface Association

  • All Superinterfaces:
    All Known Implementing Classes:

    public interface Association
    extends Property
    Extension of Property to represent an Association, or relationship, between two attributes.

    The notion of an "association" is similar to that of an association in UML and is used to model a relationship between entities. Examples of such a relationship could be:

    • aggregation: An attribute may contain another attribute
    • spatial: A feature is spatial related to another (touches, intersects, etc..)
    • temporal: An is a previous version of another attribute in a versioning system


    The value of an association is an Attribute. As an example consider the following xml complex type definitions:

       <complexType name="fooType">
       <element name="foo" type="fooType"/>
       <complexType name="barType">
           <element name="intAttribute" type="xs:int"/>
           <element name="stringAttribute" type="xs:string"/>
           <element name="fooAssociation" type="xlink:href"/>
       <element name="bar" type="barType"/>
    In the above, "fooType" is an identifiable type. Now consider the following section of an xml instance document:
       <foo id="someId">
    Realizing this as objects with attributes and associations we get:
       ComplexAttribute bar = ...;
       Attribute intAttribute = (Attribute) bar.getProperty( "intAttribute" );
       intAttribute.getValue() == 1
       Attribute stringAttribute = (Attribute) bar.getProperty( "stringAttribute" );
       stringAttribute.getValue() == "one"
       Association fooAssociation = (Association) bar.getProperty( "fooAssociation" );
       Attribute foo =  fooAssociation.getValue();
    Jody Garnett, Refractions Research, Justin Deoliveira, The Open Planning Project