edu.uga.cs.lsdis.semdisds
Interface IOntologyModel


public interface IOntologyModel

Ontology Model - get/create/etc instances, classes, relationships, literals, statements, etc


Method Summary
 IBlankNode createBlankNode()
          Creates new blank node in the model
 IInstanceNode createInstanceNode(java.lang.String aURI)
          Creates new InstanceNode in the model or, if it already exists, returns the existing one
 ILiteral createLiteral(java.lang.String aValue)
          Creates new Literal in the model or, if it already exists, returns the existing one
 ILiteralRange createLiteralRange(java.lang.String name)
          Creates a LiteralRange object, the 'name' can be something like: http://www.w3.org/2001/XMLSchema#integer
 ILiteralStatement createLiteralStatement(IResource aSubject, ISchemaProperty aPredicate, ILiteral aObject)
          Creates literal statement - resrouce X is connected to literal Y
 ISchemaClass createSchemaClass(java.lang.String aURI)
          Creates new SchemaClass in the model or, if it already exists, returns the existing one
 ISchemaDatatypeProperty createSchemaDatatypeProperty(java.lang.String aURI)
          Creates new SchemaDatatypeProperty in the model or, if it already exists, returns the existing one
 ISchemaObjectProperty createSchemaObjectProperty(java.lang.String aURI)
          Creates new SchemaObjectProperty in the model or, if it already exists, returns the existing one
 ISchemaProperty createSchemaProperty(java.lang.String aURI)
          Creates new SchemaProperty in the model or, if it already exists, returns the existing one
 IResourceStatement createStatement(IInstanceNode aSubject, ISchemaProperty aPredicate, IInstanceNode aObject)
          Creates statement that connect two instances
 IResourceStatement createStatement(ISchemaClass aSubject, ISchemaProperty aPredicate, ISchemaClass aObject)
          Creates statement that include only schema classes - schema ontology
 IResourceStatement createStatement(ISchemaProperty aSubject, ISchemaProperty aPredicate, ISchemaProperty aObject)
          Creates statement property-property-property - ontology of properties
 ITypeOfStatement createTypeOfStatement(IInstanceNode aSubject, ISchemaClass aType)
          Creates type statement - instance X is of type Y
 IInstanceNode getInstanceNode(java.lang.String aURI)
          Returns existing instance node or null if not found
 int getInstanceNodeCount()
          Returns count of instance nodes in the model
 IExtendedIterator<IInstanceNode> getInstanceNodes()
          Returns all instance nodes from model
 int getInstanceStatementCount()
          Returns number of instance statements
 IExtendedIterator<IResourceStatement> getInstanceStatements()
          Returns instance statements from ontology
 ILiteral getLiteral(java.lang.String aValue)
          Returns existing literal node or null if not found
 int getLiteralCount()
          Returns count of literals in the model
 IExtendedIterator<ILiteral> getLiterals()
          Returns all literals from model
 int getLiteralStatementCount()
          Returns number of literal statements
 IExtendedIterator<ILiteralStatement> getLiteralStatements()
          Returns all literal statements in ontology
 ISchemaClass getSchemaClass(java.lang.String aURI)
          Returns existing schemaClass or null if not found
 int getSchemaClassCount()
          Returns count of schema classes in the model
 IExtendedIterator<ISchemaClass> getSchemaClasses()
          Returns all SchemaClass objects in model
 int getSchemaClassStatementCount()
          Returns number of schema class statements
 IExtendedIterator<IResourceStatement> getSchemaClassStatements()
          Returns all schema class statements
 IExtendedIterator<ISchemaProperty> getSchemaProperties()
          Retuns all SchemaProperties in the model
 ISchemaProperty getSchemaProperty(java.lang.String aURI)
          Returns existing SchemaProperty object or null if not found
 int getSchemaPropertyCount()
          Returns count of schema properties in model
 int getSchemaPropertyStatementCount()
          Returns number of schema property statements
 IExtendedIterator<IResourceStatement> getSchemaPropertyStatements()
          Returns all SchemaProperty statements
 IExtendedIterator<ILiteralStatement> getStatements(IResource subject, ISchemaProperty property, ILiteral literal)
          Returns statements with specified subject, predicate, literal
 IExtendedIterator<IResourceStatement> getStatements(IResource subject, ISchemaProperty property, IResource object)
          Returns statements with specified subject, predicate, object
 void loadOntology(java.lang.String aLocation)
          Loads ontology model from the specified location
 

Method Detail

getInstanceStatements

IExtendedIterator<IResourceStatement> getInstanceStatements()

Returns instance statements from ontology

Returns:
returns IExtendedIterator

getSchemaClassStatements

IExtendedIterator<IResourceStatement> getSchemaClassStatements()

Returns all schema class statements

Returns:
returns IExtendedIterator

getSchemaPropertyStatements

IExtendedIterator<IResourceStatement> getSchemaPropertyStatements()

Returns all SchemaProperty statements

Returns:
IExtendedIterator

getLiteralStatements

IExtendedIterator<ILiteralStatement> getLiteralStatements()

Returns all literal statements in ontology

Returns:
IExtendedIterator

createLiteral

ILiteral createLiteral(java.lang.String aValue)

Creates new Literal in the model or, if it already exists, returns the existing one

Parameters:
aValue - the lteral value, if it is null, no object is created and this method returns null
Returns:
new literal object

createInstanceNode

IInstanceNode createInstanceNode(java.lang.String aURI)

Creates new InstanceNode in the model or, if it already exists, returns the existing one

Parameters:
aURI -
Returns:
a new instance node

createSchemaClass

ISchemaClass createSchemaClass(java.lang.String aURI)

Creates new SchemaClass in the model or, if it already exists, returns the existing one

Parameters:
aURI - the uri, if it is null, no object is created and this method returns null
Returns:
a new schema class

createSchemaProperty

ISchemaProperty createSchemaProperty(java.lang.String aURI)

Creates new SchemaProperty in the model or, if it already exists, returns the existing one

Parameters:
aURI -
Returns:
a new schema property

createSchemaObjectProperty

ISchemaObjectProperty createSchemaObjectProperty(java.lang.String aURI)

Creates new SchemaObjectProperty in the model or, if it already exists, returns the existing one

Parameters:
aURI -
Returns:
a new schema object property

createSchemaDatatypeProperty

ISchemaDatatypeProperty createSchemaDatatypeProperty(java.lang.String aURI)

Creates new SchemaDatatypeProperty in the model or, if it already exists, returns the existing one

Parameters:
aURI -
Returns:
the schema datatype property

createBlankNode

IBlankNode createBlankNode()

Creates new blank node in the model

Returns:
the created blank node

getLiteral

ILiteral getLiteral(java.lang.String aValue)

Returns existing literal node or null if not found

Parameters:
aValue -
Returns:
the literal or null if not found

getInstanceNode

IInstanceNode getInstanceNode(java.lang.String aURI)

Returns existing instance node or null if not found

Parameters:
aURI -
Returns:
the instance node, or null if not found

getSchemaClass

ISchemaClass getSchemaClass(java.lang.String aURI)

Returns existing schemaClass or null if not found

Parameters:
aURI -
Returns:
the schema class or null if not found

getSchemaProperty

ISchemaProperty getSchemaProperty(java.lang.String aURI)

Returns existing SchemaProperty object or null if not found

Parameters:
aURI -
Returns:
the schema property or null if not found

createStatement

IResourceStatement createStatement(IInstanceNode aSubject,
                                   ISchemaProperty aPredicate,
                                   IInstanceNode aObject)

Creates statement that connect two instances

Parameters:
aSubject -
aPredicate -
aObject -
Returns:
the statement

createStatement

IResourceStatement createStatement(ISchemaClass aSubject,
                                   ISchemaProperty aPredicate,
                                   ISchemaClass aObject)

Creates statement that include only schema classes - schema ontology

Parameters:
aSubject -
aPredicate -
aObject -
Returns:
the statement

createLiteralStatement

ILiteralStatement createLiteralStatement(IResource aSubject,
                                         ISchemaProperty aPredicate,
                                         ILiteral aObject)

Creates literal statement - resrouce X is connected to literal Y

Parameters:
aSubject -
aPredicate -
aObject -
Returns:
the literal statement

createTypeOfStatement

ITypeOfStatement createTypeOfStatement(IInstanceNode aSubject,
                                       ISchemaClass aType)

Creates type statement - instance X is of type Y

Parameters:
aSubject -
aType -
Returns:
the type statement

createStatement

IResourceStatement createStatement(ISchemaProperty aSubject,
                                   ISchemaProperty aPredicate,
                                   ISchemaProperty aObject)

Creates statement property-property-property - ontology of properties

Parameters:
aSubject -
aPredicate -
aObject -
Returns:
the statement

getLiterals

IExtendedIterator<ILiteral> getLiterals()

Returns all literals from model

Returns:
IExtendedIterator

getInstanceNodes

IExtendedIterator<IInstanceNode> getInstanceNodes()

Returns all instance nodes from model

Returns:
IExtendedIterator

getSchemaClasses

IExtendedIterator<ISchemaClass> getSchemaClasses()

Returns all SchemaClass objects in model

Returns:
IExtendedIterator

getSchemaProperties

IExtendedIterator<ISchemaProperty> getSchemaProperties()

Retuns all SchemaProperties in the model

Returns:
IExtendedIterator

getSchemaClassStatementCount

int getSchemaClassStatementCount()

Returns number of schema class statements

Returns:
the number of schema class statements

getInstanceStatementCount

int getInstanceStatementCount()

Returns number of instance statements

Returns:
the number of instance statements

getSchemaPropertyStatementCount

int getSchemaPropertyStatementCount()

Returns number of schema property statements

Returns:
the number of schema property statements

getLiteralStatementCount

int getLiteralStatementCount()

Returns number of literal statements

Returns:
the number of literal statements

getLiteralCount

int getLiteralCount()

Returns count of literals in the model

Returns:
the number of literal statements

getInstanceNodeCount

int getInstanceNodeCount()

Returns count of instance nodes in the model

Returns:
the number of instance nodes

getSchemaClassCount

int getSchemaClassCount()

Returns count of schema classes in the model

Returns:
the number of schema classes

getSchemaPropertyCount

int getSchemaPropertyCount()

Returns count of schema properties in model

Returns:
the number os schema properties

loadOntology

void loadOntology(java.lang.String aLocation)

Loads ontology model from the specified location

Parameters:
aLocation - Location (file/URI) of ontology to load

createLiteralRange

ILiteralRange createLiteralRange(java.lang.String name)

Creates a LiteralRange object, the 'name' can be something like: http://www.w3.org/2001/XMLSchema#integer

Parameters:
name -
Returns:
the literal range

getStatements

IExtendedIterator<IResourceStatement> getStatements(IResource subject,
                                                    ISchemaProperty property,
                                                    IResource object)

Returns statements with specified subject, predicate, object

A null parameter is interpreted as ANY

Parameters:
subject - The subject resource
property - The schema property
object - The object resource
Returns:
an IExtendedIterator with results

getStatements

IExtendedIterator<ILiteralStatement> getStatements(IResource subject,
                                                   ISchemaProperty property,
                                                   ILiteral literal)

Returns statements with specified subject, predicate, literal

A null parameter is interpreted as ANY

Parameters:
subject - The subject resource
property - The schema property
literal - The literal object
Returns:
an IExtendedIterator with results