uk.ac.soton.itinnovation.registry.icomponent.model.jena
Class RegistryDomainModelJenaImpl

java.lang.Object
  extended by uk.ac.soton.itinnovation.registry.icomponent.model.RegistryDomainModelSupport
      extended by uk.ac.soton.itinnovation.registry.icomponent.model.jena.RegistryDomainModelJenaImpl
All Implemented Interfaces:
RegistryDomainModel

public final class RegistryDomainModelJenaImpl
extends RegistryDomainModelSupport
implements RegistryDomainModel


Field Summary
 
Fields inherited from class uk.ac.soton.itinnovation.registry.icomponent.model.RegistryDomainModelSupport
logger
 
Constructor Summary
RegistryDomainModelJenaImpl()
           
 
Method Summary
 void addBidirectionalRelationship(String fromConcept, String fromToToRelationship, String toToFromRelationship, String toConcept)
          Add a bidirectional relationship between two concepts.
 void addConcept(String concept)
          Add a concept to the domain model.
 void addRelationship(String fromConcept, String relationship, String toConcept)
          Add a relationship between two concepts.
 boolean addSubConcept(String concept, String subconcept)
          Add a concept as a subconcept to another concept.
 boolean containsConcept(String concept)
          Checks if a concept exists in the domain model.
 boolean containsRelationship(String fromConcept, String relationship, String toConcept)
           
 void createInternalModel()
          This method creates the internal used registry domain model based on an OWL Ontology.
 void dumpModel()
          Dump the internal model and the OWL representation.
 void dumpModelToLogger()
          Dump the internal model and the OWL representation.
 Set<String> getConcepts()
          Get all concepts of the domain model.
 Set<String> getHierarchyRootConcepts()
          Get all root concepts that represent the uppermost nodes of the concept hierarchy.
 Set<Relationship> getIncomingRelationships(String concept)
           
 com.hp.hpl.jena.ontology.OntModel getOntModel()
           
 Set<Relationship> getOutgoingRelationships(String concept)
           
 List<Relationship> getRelationships()
          Get all relationships defined between uppermost concepts.
 Set<String> getRelationships(String fromConcept, String toConcept)
           
 List<String> getSubConcepts(String concept, boolean direct)
          Get the (direct) sub concepts (is-a) of a concept.
 List<String> getSuperConcepts(String concept, boolean direct)
          Get the (direct) super concepts (is-a) of a concept.
 String getXmlRepresentation()
          Get a xml string representation of the registry domain model.
 boolean isSubConceptOf(String subConcept, String superConcept)
           
 boolean relationshipExists(String relationship)
           
 void setInverseRelationhip(String relationship, String inverseOf)
           
 void setOntModel(com.hp.hpl.jena.ontology.OntModel ontModel)
           
 void setOntModel(String xmlRepresentation, String registryDomainModelNS)
          Set up the ontology model based on a XML representation (OWL).
 
Methods inherited from class uk.ac.soton.itinnovation.registry.icomponent.model.RegistryDomainModelSupport
getInverseRelationship, hasInverseRelationship
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.soton.itinnovation.registry.icomponent.model.RegistryDomainModel
getInverseRelationship, hasInverseRelationship
 

Constructor Detail

RegistryDomainModelJenaImpl

public RegistryDomainModelJenaImpl()
Method Detail

getOntModel

public final com.hp.hpl.jena.ontology.OntModel getOntModel()

setOntModel

public final void setOntModel(com.hp.hpl.jena.ontology.OntModel ontModel)

setOntModel

public final void setOntModel(String xmlRepresentation,
                              String registryDomainModelNS)
                       throws Exception
Set up the ontology model based on a XML representation (OWL).

Parameters:
xmlRepresentation -
Throws:
ParsingException
Exception

addConcept

public void addConcept(String concept)
Description copied from interface: RegistryDomainModel
Add a concept to the domain model.

Specified by:
addConcept in interface RegistryDomainModel
Specified by:
addConcept in class RegistryDomainModelSupport

containsConcept

public boolean containsConcept(String concept)
Description copied from interface: RegistryDomainModel
Checks if a concept exists in the domain model.

Specified by:
containsConcept in interface RegistryDomainModel
Specified by:
containsConcept in class RegistryDomainModelSupport

getConcepts

public Set<String> getConcepts()
Description copied from interface: RegistryDomainModel
Get all concepts of the domain model.

Specified by:
getConcepts in interface RegistryDomainModel
Specified by:
getConcepts in class RegistryDomainModelSupport

getHierarchyRootConcepts

public Set<String> getHierarchyRootConcepts()
Description copied from interface: RegistryDomainModel
Get all root concepts that represent the uppermost nodes of the concept hierarchy.

Specified by:
getHierarchyRootConcepts in interface RegistryDomainModel

getOutgoingRelationships

public Set<Relationship> getOutgoingRelationships(String concept)
Specified by:
getOutgoingRelationships in interface RegistryDomainModel

getIncomingRelationships

public Set<Relationship> getIncomingRelationships(String concept)
Specified by:
getIncomingRelationships in interface RegistryDomainModel

addBidirectionalRelationship

public void addBidirectionalRelationship(String fromConcept,
                                         String fromToToRelationship,
                                         String toToFromRelationship,
                                         String toConcept)
Description copied from interface: RegistryDomainModel
Add a bidirectional relationship between two concepts.

Specified by:
addBidirectionalRelationship in interface RegistryDomainModel

addRelationship

public void addRelationship(String fromConcept,
                            String relationship,
                            String toConcept)
Description copied from interface: RegistryDomainModel
Add a relationship between two concepts.

Specified by:
addRelationship in interface RegistryDomainModel
Overrides:
addRelationship in class RegistryDomainModelSupport

setInverseRelationhip

public void setInverseRelationhip(String relationship,
                                  String inverseOf)
Specified by:
setInverseRelationhip in interface RegistryDomainModel
Overrides:
setInverseRelationhip in class RegistryDomainModelSupport

getSuperConcepts

public List<String> getSuperConcepts(String concept,
                                     boolean direct)
Description copied from interface: RegistryDomainModel
Get the (direct) super concepts (is-a) of a concept.

Specified by:
getSuperConcepts in interface RegistryDomainModel
direct - if true, only the direct super concepts
Returns:
super concepts

getSubConcepts

public List<String> getSubConcepts(String concept,
                                   boolean direct)
Description copied from interface: RegistryDomainModel
Get the (direct) sub concepts (is-a) of a concept.

Specified by:
getSubConcepts in interface RegistryDomainModel
direct - if true, only the direct sub concepts
Returns:
sub concepts

isSubConceptOf

public boolean isSubConceptOf(String subConcept,
                              String superConcept)
Specified by:
isSubConceptOf in interface RegistryDomainModel

addSubConcept

public boolean addSubConcept(String concept,
                             String subconcept)
Description copied from interface: RegistryDomainModel
Add a concept as a subconcept to another concept.

Specified by:
addSubConcept in interface RegistryDomainModel
Parameters:
concept - parent
subconcept - child

containsRelationship

public boolean containsRelationship(String fromConcept,
                                    String relationship,
                                    String toConcept)
Specified by:
containsRelationship in interface RegistryDomainModel
Overrides:
containsRelationship in class RegistryDomainModelSupport

getRelationships

public Set<String> getRelationships(String fromConcept,
                                    String toConcept)
Specified by:
getRelationships in interface RegistryDomainModel
Overrides:
getRelationships in class RegistryDomainModelSupport

relationshipExists

public boolean relationshipExists(String relationship)
Specified by:
relationshipExists in interface RegistryDomainModel
Overrides:
relationshipExists in class RegistryDomainModelSupport

dumpModel

public void dumpModel()
Dump the internal model and the OWL representation.

Overrides:
dumpModel in class RegistryDomainModelSupport

dumpModelToLogger

public void dumpModelToLogger()
Dump the internal model and the OWL representation.

Overrides:
dumpModelToLogger in class RegistryDomainModelSupport

createInternalModel

public void createInternalModel()
This method creates the internal used registry domain model based on an OWL Ontology.


getXmlRepresentation

public String getXmlRepresentation()
Description copied from interface: RegistryDomainModel
Get a xml string representation of the registry domain model.

Specified by:
getXmlRepresentation in interface RegistryDomainModel
Overrides:
getXmlRepresentation in class RegistryDomainModelSupport
Returns:
xml representation

getRelationships

public List<Relationship> getRelationships()
Description copied from interface: RegistryDomainModel
Get all relationships defined between uppermost concepts.

Specified by:
getRelationships in interface RegistryDomainModel


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.