com.att.gs.codip.ograph
Interface OGResource

All Superinterfaces:
LogicalResource
All Known Subinterfaces:
OGClass, OGDatatype, OGLiteral, OGOntology, OGProperty, OGPropInstance
All Known Implementing Classes:
DAML, OGBaseOntology, OGClassImp, OGDatatypeImp, OGLiteralImp, OGOntologyImp, OGPropertyImp, OGPropInstanceImp, OGResourceImp, OGVirtualOntologyImp, OWL, RDFS, XSD

public interface OGResource
extends LogicalResource

Provides shared functionality of Ontology Resources.

All instances of resource have a colleciton of Properties.

The resource ID is unique and immutable once created. Currently the ID is the resources URI.

Each resource exists with in a single XML Name Space.


Method Summary
 OGPropInstance addNewPropInstance(OGResource newPropType, OGResource theObject)
          Creates a property instantce and adds it to the resource.
 void addPropInstance(OGPropInstance thePropInstance)
          Adds the provided property instance to the resource.
 void addType(OGResource theType)
          Adds the given type to the list of multi-types.
 boolean containsPropInstance(java.lang.Object theID)
          Checks for the existence of a property in this resource whose ID matches the provided ID.
 boolean containsType(OGResource theType)
          Type checker for multi-types.
 java.lang.String getComment()
          Getter method for this resource's comment string.
 java.lang.String getID()
          Getter method for the Resources ID.
 java.lang.String getLabel()
          Getter method for this resource's label string.
 java.lang.String getLocalName()
          Getter method for this resource's Local Name.
 java.lang.String getNamespace()
          Getter method for this resource's Namespace.
 OGOntology getOntology()
          Getter method for this resource's Ontology.
 OGPropInstance getPropInstance(java.lang.Object theID)
          Looks for a property of this resource whose ID matches the provided ID.
 OGPropInstance[] getPropInstances()
          Accessor for the read only indexed bean property, "properties"
 java.util.Collection getPropInstances(OGResource aType)
          Provies a Collection for all of the resource's properties that are a particular type.
 java.lang.String getURI()
          Getter method for this resource's URI.
 OGPropInstance lookupPropInstance(java.lang.Object theID)
          Looks for a matching property in this resource.
 java.util.Iterator propInstances()
          Provides a iterator for the all of the resource's properties.
 java.util.Iterator propInstances(OGResource aType)
          Looks for a property of this resource that is a particular type.
 void removePropInstance(OGPropInstance thePropInstance)
          Removes the provided property instance from the resource.
 void removeType(OGResource theType)
          Removes the given type from the list of multi-types.
 void setComment(java.lang.String theComment)
          Setter method for this resource's comment string.
 void setLabel(java.lang.String theLabel)
          Setter method for this resource's label string.
 java.util.Iterator types()
          Provides an iterator over the list of multi-types.
 
Methods inherited from interface com.att.gs.codip.resource.LogicalResource
getType, isLiteralType, isType, setType
 

Method Detail

getID

public java.lang.String getID()
Getter method for the Resources ID. The resource ID is unique and immutable once created. Currently the ID is the resources URI.

Specified by:
getID in interface LogicalResource

setLabel

public void setLabel(java.lang.String theLabel)
Setter method for this resource's label string.

Specified by:
setLabel in interface LogicalResource
Parameters:
theLabel - The label of this resource.

getLabel

public java.lang.String getLabel()
Getter method for this resource's label string.

Specified by:
getLabel in interface LogicalResource

setComment

public void setComment(java.lang.String theComment)
Setter method for this resource's comment string.

Specified by:
setComment in interface LogicalResource
Parameters:
theComment - The comment for this resource.

getComment

public java.lang.String getComment()
Getter method for this resource's comment string.

Specified by:
getComment in interface LogicalResource

getURI

public java.lang.String getURI()
Getter method for this resource's URI. The URI is immutable and is set when an ontology is built from an RDF model. It is also used when an RDF model is built from the ontology.

Specified by:
getURI in interface LogicalResource

getNamespace

public java.lang.String getNamespace()
Getter method for this resource's Namespace. The Namespace is immutable and is set when an ontology is built from an RDF model. It is also used when an RDF model is built from the ontology.

Specified by:
getNamespace in interface LogicalResource

getLocalName

public java.lang.String getLocalName()
Getter method for this resource's Local Name. The Local Name is immutable and is set when an ontology is built from an RDF model. It is also used when an RDF model is built from the ontology.

Specified by:
getLocalName in interface LogicalResource

getOntology

public OGOntology getOntology()
Getter method for this resource's Ontology. The Ontology is immutable and is set when the resource is created.


containsType

public boolean containsType(OGResource theType)
Type checker for multi-types.


addType

public void addType(OGResource theType)
Adds the given type to the list of multi-types.


removeType

public void removeType(OGResource theType)
Removes the given type from the list of multi-types. Use with caution.


types

public java.util.Iterator types()
Provides an iterator over the list of multi-types.


lookupPropInstance

public OGPropInstance lookupPropInstance(java.lang.Object theID)
Looks for a matching property in this resource. Searches this resource for a property whose ID matches the provided ID.

Parameters:
theID - The ID of the sought property.
Returns:
The matching property if found, otherwise returns void.

addNewPropInstance

public OGPropInstance addNewPropInstance(OGResource newPropType,
                                         OGResource theObject)
Creates a property instantce and adds it to the resource. THe property is of the provided type, it subject is this resource, and its object is the provided resource. *

Parameters:
newPropType - The type of the property instance.
theObject - The object of the property instance.
Returns:
The created property instance.

addPropInstance

public void addPropInstance(OGPropInstance thePropInstance)
Adds the provided property instance to the resource. *


removePropInstance

public void removePropInstance(OGPropInstance thePropInstance)
Removes the provided property instance from the resource.

Parameters:
thePropInstance - The property to remove from the resource.

getPropInstance

public OGPropInstance getPropInstance(java.lang.Object theID)
Looks for a property of this resource whose ID matches the provided ID. Functionally indentical to lookupPropInstance.

Parameters:
theID - The ID of the sought property.
Returns:
The matching property if found, otherwise returns void.

getPropInstances

public OGPropInstance[] getPropInstances()
Accessor for the read only indexed bean property, "properties"

Returns:
The properties of this resources as an array.

containsPropInstance

public boolean containsPropInstance(java.lang.Object theID)
Checks for the existence of a property in this resource whose ID matches the provided ID.

Parameters:
theID - The ID of the sought property.
Returns:
true if the property exists in this ontology.

propInstances

public java.util.Iterator propInstances()
Provides a iterator for the all of the resource's properties.

Returns:
An iterator over all the resource's properties

propInstances

public java.util.Iterator propInstances(OGResource aType)
Looks for a property of this resource that is a particular type.

Parameters:
aType - The type of the sought properties.
Returns:
An iterator over some the resource's properties.

getPropInstances

public java.util.Collection getPropInstances(OGResource aType)
Provies a Collection for all of the resource's properties that are a particular type.

Parameters:
aType - The type of the sought properties.
Returns:
A collection of some of the resource's properties.


CODIP AT&T Government Solutions, Inc.