gr.forth.ics.rdfsuite.swkm.model
Interface IRDF_Model

All Known Subinterfaces:
IRDFDB_Model
All Known Implementing Classes:
RDF_Model, RDFDB_Model

public interface IRDF_Model


Method Summary
 void addClassInstance(IRDF_Individual class_instance)
          Adds a class instance in MM
 void addComment(IRDF_Resource resource, IRDF_Comment comment)
          Adds a comment relation in Main Memory
 void addContainer(IRDF_Container container)
          Adds a container in MM
 void addDomain(IRDF_Property property, IRDF_Domain domain)
          Adds a domain relation in Main Memory
 void addGraphspace(IRDF_Graphspace graphspace)
          Adds an RDF_Graphspace object in the HashMap of RDF_Graphspace objects with key its uri
 void addIsDefinedBy(IRDF_Resource resource, IRDF_IsDefinedBy isdefinedby)
          Adds a isDefinedBy relation in Main Memory
 void addLabel(IRDF_Resource resource, IRDF_Label label)
          Adds a label relation in Main Memory
 void addMember(IRDF_Container container, IRDF_Member member)
          Adds a member relation in Main Memory
 void addNamespace(IRDF_Namespace namespace)
          Adds an RDF_Namespace object in the HashMap of RDF_Namespace objects with key its uri
 void addObject(IRDF_Statement statement, IRDF_Object object)
          Adds a object relation in Main Memory
 void addPredicate(IRDF_Statement statement, IRDF_Predicate predicate)
          Adds a predicate relation in Main Memory
 void addPropertyInstance(IRDF_PropertyInstance property_instance)
          Adds a property instance in MM
 void addRange(IRDF_Property property, IRDF_Range range)
          Adds a range relation in Main Memory
 void addSeeAlso(IRDF_Resource resource, IRDF_SeeAlso seealso)
          Adds a seeAlso relation in Main Memory
 boolean addStatement(java.lang.String subject, java.lang.String predicate, java.lang.String object, java.lang.String namespace_uri, java.lang.String graphspace_uri, Position pos)
          Explicitly adds a string triple in the given namespace,graphspace When this method is not called iternally by the model, the default namespaces, rdf_scheme,rdf.xml_schema,rdfsuite should be imported using the appropriate import methods in the model.
 void addSubClass(IRDF_Class rdf_class, IRDF_SubClass subclass)
          Adds a subClass relation in Main Memory
 void addSubject(IRDF_Statement statement, IRDF_Subject subject)
          Adds a subject relation in Main Memory
 void addSubProperty(IRDF_Property property, IRDF_SubProperty subproperty)
          Adds a subProperty relation in Main Memory
 void addType(IRDF_Resource resource, IRDF_Type type)
          Adds a type relation in Main Memory
 RDF_DAG createClassDag()
          Creates the subsumption dag for all the model's classes
 void createDags()
          Creates the subsumption dags for classes,proeprties,metaclasses,metaproperties.
 void createLabels()
          Given the class dag,property dag,metaclass dag nad metaproperty dag for this model assignes a unique label to each resource of the model
 RDF_DAG createMetaClassDag()
          Creates the subsumption dag for all the model's metaclass
 RDF_DAG createMetaPropertyDag()
          Creates the subsumprion dag for all the model's metaproperties
 RDF_DAG createPropertyDag()
          Creates the subsumprion dag for all the model's properties
 void eliminateRedundancies()
          Makes the model redundant free.
 AvailableStreams getAvailableStreams()
          Retrieves the Available namespace streams for building this model
 java.util.Collection<IRDF_Class> getClasses(boolean considerRDFNS, boolean considerXSDNS)
           
 IRDF_Individual getClassInstance(java.lang.String class_instance_uri)
          Retrieves a class instance given its uri
 java.util.HashMap getClassInstances()
          Retrieves all class instances from MM
 java.util.Collection getComment(IRDF_Resource rdf_resource)
          Retrieves the Collection of RDF_Comment objects in which rdf_resource "participates"
 org.apache.commons.collections.MultiMap getComments()
          Retrieves all the comment relations stored in main memory
 IRDF_Container getContainer(java.lang.String container_uri)
          Retrieves a container given its uri
 java.util.HashMap getContainers()
          Retrieves all containers from MM
 java.util.Collection getDomain(IRDF_Property rdf_property)
          Retrieves the Collection of RDF_Domains objects in which rdf_property "participates"
 org.apache.commons.collections.MultiMap getDomains()
          Retrieves all the domain relations stored in main memory
 IRDF_Graphspace getGraphspace(java.lang.String graphspace_uri)
          Retrieves an RDF_Graphspace from the MM using the given graphspace uri as a key
 java.util.HashMap getGraphspaces()
          Retrieves all the Graphspaces stored in Main Memory(MM)
 java.util.Collection<IRDF_Type> getInstances(IRDF_Class rdf_class)
          Retrieves the Collection of RDF_Type objects in which the given class "participates" as the type class.
 java.util.Collection getIsDefinedBy(IRDF_Resource rdf_resource)
          Retrieves the Collection of RDF_IsDefinedBy objects in which rdf_resource "participates"
 org.apache.commons.collections.MultiMap getIsDefinedBys()
          Retrieves all the isDefinedBy relations stored in main memory
 java.util.Collection getLabel(IRDF_Resource rdf_resource)
          Retrieves the Collection of RDF_Label objects in which rdf_resource "participates"
 org.apache.commons.collections.MultiMap getLabels()
          Retrieves all the label relations stored in main memory
 boolean getLabelsCreated()
          Returns true if labels are created for this model
 java.util.Collection getMember(IRDF_Container container)
          Retrieves the Collection of RDF_Member objects in which rdf_container "participates"
 org.apache.commons.collections.MultiMap getMembers()
          Retrieves all the container membership relations stored in main memory
 IRDF_Namespace getNamespace(java.lang.String namespace_uri)
          Retrieves an RDF_Namespace from the MM using the given namespace uri as a key
 java.util.HashMap getNamespaces()
          Retrieves all the Namespaces stored in Main Memory(MM)
 IRDF_Object getObject(IRDF_Statement rdf_statement)
          Retrieves the Collection of RDF_Object objects in which rdf_statement "participates"
 java.util.HashMap<IRDF_Statement,IRDF_Object> getObjects()
          Retrieves all the object relations stored in main memory
 IRDF_Graphspace getOrCreateGraphspace(java.lang.String graphspace_uri)
          This method retrieves an RDF_Graphspace with a given uri.
 IRDF_Namespace getOrCreateNamespace(java.lang.String namespace_uri)
          This method retrieves an RDF_Namespace with a given uri from MM.
 IRDF_Predicate getPredicate(IRDF_Statement statement)
          Retrieves the Collection of RDF_Predicate objects in which statement "participates"
 java.util.HashMap<IRDF_Statement,IRDF_Predicate> getPredicates()
          Retrieves all the predicate relations stored in main memory
 java.util.Collection<IRDF_Property> getProperties(boolean considerRDFNS, boolean considerXSDNS)
           
 java.util.Collection getPropertyInstance(java.lang.String property_instance_uri)
          Retrieves a property instance given its uri
 org.apache.commons.collections.MultiMap getPropertyInstances()
          Retrieves all the property instances stored in MM
 java.util.Collection<IRDF_PropertyInstance> getPropertyInstanceWithSubjectAndObject(java.lang.String subject, java.lang.String object)
          Retrieves all the property instances with the given subject and object
 IRDF_PropertyInstance getPropertyInstanceWithSubjectPredicateAndObject(java.lang.String subject, java.lang.String property_instance_uri, java.lang.String object)
          Retrieves all the property instances with the given subject,predicate,object
 java.util.Collection getRange(IRDF_Property rdf_property)
          Retrieves the Collection of RDF_Range objects in which rdf_property "participates"
 org.apache.commons.collections.MultiMap getRanges()
          Retrieves all the range relations stored in main memory
 java.util.Collection getSeeAlso(IRDF_Resource rdf_resource)
          Retrieves the Collection of RDF_SeeAlso objects in which rdf_resource "participates"
 org.apache.commons.collections.MultiMap getSeeAlsos()
          Retrieves all the seeAlso relations stored in main memory
 org.apache.commons.collections.MultiMap getSubClasses()
          Retrieves all the subClass relations stored in main memory
 java.util.Collection<IRDF_SubClass> getSubClassOf(IRDF_Class rdf_class)
          Retrieves the superclasses of this class
 IRDF_Subject getSubject(IRDF_Statement rdf_statement)
          Retrieves the Collection of RDF_Subject objects in which rdf_statement "participates"
 java.util.HashMap<IRDF_Statement,IRDF_Subject> getSubjects()
          Retrieves all the subject relations stored in main memory
 org.apache.commons.collections.MultiMap getSubProperties()
          Retrieves all the subProperty relations stored in main memory
 java.util.Collection<IRDF_SubProperty> getSubProperty(IRDF_Property rdf_property)
          Retrieves the subproperties of this class
 java.util.Collection<IRDF_SubClass> getSuperClassOf(IRDF_Class rdf_class)
          retrieves the subclasses of this class
 java.util.Collection<IRDF_SubProperty> getSuperProperty(IRDF_Property rdf_property)
          Retrieves the superproperties of this class
 java.util.Collection<IRDF_Type> getType(IRDF_Resource rdf_type)
          Retrieves the Collection of RDF_Type objects in which rdf_type "participates"
 org.apache.commons.collections.MultiMap getTypes()
          Retrieves all the type relations stored in main memory
 void import_default_namespaces()
          This method loads in MM RDF and RDFSchema Namespaces
 void import_graphspaces(java.util.ArrayList import_graphspaces, java.lang.String base_uri)
          This method loads all the graphspaces specified in the import_graphspaces parameter in the model.
 void import_namespaces(java.util.ArrayList import_namespaces, java.lang.String base_uri)
          This method loads all the namespaces specified in the import_namespaces parameter in the model.
 void import_rdfsuite_namespace()
          This method loads in MM the RDFSuite Namespace
 void import_xmlschema_namespace()
          This method loads in MM the xmlschema namespace
 void read(java.io.InputStream file, java.lang.String base_uri, java.lang.String triple_format, boolean fetch_dependencies, boolean strict)
          Receives input from an Input Stream an loads the corresponding namespaces/graphspaces to the model The base_uri given as a parameter should be the same as the one included in the file(if one)
 void read(java.lang.String file_name, java.lang.String base_uri, java.lang.String triple_format, boolean fetch_dependencies, boolean strict)
          Receives input from a file an loads the corresponding namespaces/graphspaces to the model The base_uri given as a parameter should be the same as the one included in the file(if one)
 void readAll(java.util.Map<java.lang.String,java.lang.String> files, java.lang.String triple_format, boolean fetch_dependencies, boolean strict)
          Receives all the available files in a Map along with their uris and makes sure they are parsed in the correct order resolving any possible dependencies between them.
 IRDF_Resource retrieveResource(java.lang.String uri)
          Retrieves the resource withthe given uri from its namesapce( if exists)
 java.util.Iterator<IRDF_Triple> retrieveTriples(IRDF_Resource subject, IRDF_Property predicate, java.lang.Object object)
          Retrieves the triples (if any) with the given subject, predicate and/or object In case subject,predicate or object has value null this implies matching any.
 java.util.Iterator<IRDF_Triple> retrieveTriples(java.lang.String subject, java.lang.String predicate, java.lang.String object)
          Retrieves the triples (if any) with the given subject,predicate and/or object In case subject,predicate or object has value null this implies matching any.
 void setAvailableStreams(AvailableStreams avail)
          Sets the available namespace streams for fetching uris for building this model
 void setClassInstances(java.util.HashMap class_instances)
          Sets all the class instances in MM
 void setComments(IRDF_Resource resource, java.util.Collection<IRDF_Comment> comments)
          Sets the comments of a single resource
 void setComments(org.apache.commons.collections.MultiMap comments)
          Sets the comment Relationships defined in this namespace
 void setContainers(java.util.HashMap containers)
          Sets all the containers in MM
 void setDomains(IRDF_Property property, java.util.Collection<IRDF_Domain> domains)
          Sets the domains of a single property
 void setDomains(org.apache.commons.collections.MultiMap domains)
          Sets the domain Relationships defined in this namespace
 void setGraphspaces(java.util.HashMap graphspaces)
          Sets the HashMap of graphspaces in the Main Memory
 void setIsDefinedBys(IRDF_Resource resource, java.util.Collection<IRDF_IsDefinedBy> is_defined_bys)
          Sets the isDefinedBys of a single resource
 void setIsDefinedBys(org.apache.commons.collections.MultiMap is_defined_bys)
          Sets the isDefinedBy Relationships defined in this namespace
 void setLabels(IRDF_Resource resource, java.util.Collection<IRDF_Label> labels)
          Sets the labels of a single resource
 void setLabels(org.apache.commons.collections.MultiMap labels)
          Sets the label Relationships defined in this namespace
 void setLabelsCreated(boolean created)
          Sets whether labels are created for this model
 void setMembers(org.apache.commons.collections.MultiMap members)
          Sets the container membership Relationships defined in this namespace
 void setNamespaces(java.util.HashMap namespaces)
          Sets the HashMap of namespaces in the Main Memory
 void setObjects(java.util.HashMap<IRDF_Statement,IRDF_Object> objects)
          Sets the object Relationships defined in this namespace
 void setPredicates(java.util.HashMap<IRDF_Statement,IRDF_Predicate> predicates)
          Sets the predicate Relationships defined in this namespace
 void setPropertyInstances(org.apache.commons.collections.MultiMap property_instances)
          Sets all the property instances in MM
 void setRanges(IRDF_Property property, java.util.Collection<IRDF_Range> ranges)
          Sets the ranges of a single property
 void setRanges(org.apache.commons.collections.MultiMap ranges)
          Sets the range Relationships defined in this namespace
 void setSeeAlsos(IRDF_Resource resource, java.util.Collection<IRDF_SeeAlso> see_alsos)
          Sets the see alsos of a single resource
 void setSeeAlsos(org.apache.commons.collections.MultiMap see_alsos)
          Sets the seeAlso Relationships defined in this namespace
 void setSubClasses(org.apache.commons.collections.MultiMap sub_classes)
          Sets the subClass Relationships defined in this namespace
 void setSubjects(java.util.HashMap<IRDF_Statement,IRDF_Subject> subjects)
          Sets the subject Relationships defined in this namespace
 void setSubProperties(IRDF_Property property, java.util.Collection<IRDF_SubProperty> sub_properies)
          Sets the superproperties of a single property
 void setSubProperties(org.apache.commons.collections.MultiMap sub_properies)
          Sets the subProperty Relationships defined in this namespace
 void setSuperClassesOf(IRDF_Class rdf_class, java.util.Collection<IRDF_SubClass> sub_classes)
          Sets the superclasses of a single class
 void setTypes(IRDF_Resource resource, java.util.Collection<IRDF_Type> types)
          Sets the types of a single resource
 void setTypes(org.apache.commons.collections.MultiMap types)
          Sets the type Relationships defined in this namespace
 java.util.Collection toTriples(boolean setOnly)
          This method produces the statements(triples) that derive out of the Collection of namespaces and graphspaces constituting this model by calling the corresponding toTriples() methods from each namespace/graphspace in the Collections accordingly.
 java.util.Collection toTriples(java.lang.String uri)
          This method produces the statements(triples) that derive out of the namespace or graphspace described by the given uri
 void validate()
          Performs a validation of the schema and data loaded in main memory
 java.util.Map<java.lang.String,java.io.File> write_file(java.lang.String output_path, java.lang.String triple_format, java.lang.String output_base_uri, boolean setOnly, boolean multiple)
          This method outputs the the namespaces/graphspaces correlated to this model in one or more output files according to the value of parameter multiple.
 java.util.Map<java.lang.String,java.io.File> write_original_and_inferred_in_file(java.lang.String output_path, java.lang.String triple_format, java.lang.String output_base_uri, boolean setOnly, boolean multiple)
          This method writes in files both the original triples steming from the source files and the inferred triples created arbitrarily from the model to make it complete( in case the original files were not complete) Example: If a file contains only triple A subClassOf B, the model will add A type Class and B type Class triples.
 java.util.Map write_original_and_inferred_in_string(java.lang.String triple_format, java.lang.String output_base_uri, boolean setOnly, boolean multiple)
          This method writes in strings both the original triples steming from the source files and the inferred triples created arbitrarily from the model to make it complete( in case the original files were not complete) Example: If a file contains only triple A subClassOf B, the model will add A type Class and B type Class triples.
 java.util.Map write_string(java.lang.String triple_format, java.lang.String output_base_uri, boolean setOnly, boolean multiple)
          This method outputs the namespaces/graphspaces correlated to this model in a HashMap of pairs where the key is the namespace/graphspace uri and the value is the actual namespace/graphspace.
 

Method Detail

getNamespaces

java.util.HashMap getNamespaces()
Retrieves all the Namespaces stored in Main Memory(MM)

Returns:
A HashMap with key namespace_uri and value the RDF_Namespace objects

setNamespaces

void setNamespaces(java.util.HashMap namespaces)
Sets the HashMap of namespaces in the Main Memory

Parameters:
namespaces - A HashMap with key String namespace_uris and values RDF_Namespace objects

addNamespace

void addNamespace(IRDF_Namespace namespace)
Adds an RDF_Namespace object in the HashMap of RDF_Namespace objects with key its uri

Parameters:
namespace - An RDF_Namespace object

getNamespace

IRDF_Namespace getNamespace(java.lang.String namespace_uri)
Retrieves an RDF_Namespace from the MM using the given namespace uri as a key

Parameters:
namespace_uri - The String namespace uri of the desired namespace
Returns:

getGraphspaces

java.util.HashMap getGraphspaces()
Retrieves all the Graphspaces stored in Main Memory(MM)

Returns:
A HashMap with key graphspace_uri and value the RDF_Graphspace objects

setGraphspaces

void setGraphspaces(java.util.HashMap graphspaces)
Sets the HashMap of graphspaces in the Main Memory

Parameters:
graphspaces - A HashMap with key String graphspace_uris and values RDF_Graphspace objects

addGraphspace

void addGraphspace(IRDF_Graphspace graphspace)
Adds an RDF_Graphspace object in the HashMap of RDF_Graphspace objects with key its uri

Parameters:
graphspace -

getGraphspace

IRDF_Graphspace getGraphspace(java.lang.String graphspace_uri)
Retrieves an RDF_Graphspace from the MM using the given graphspace uri as a key

Parameters:
graphspace_uri - The String graphspace uri of the desired graphspace
Returns:

getPropertyInstances

org.apache.commons.collections.MultiMap getPropertyInstances()
Retrieves all the property instances stored in MM

Returns:
A MultiMap with keys (String) property instance uris and values RDF_PropertyInstance objects.The reason for the use of multimap is that there may be more than one property instances wuth the same uri "connecting" different resources

setPropertyInstances

void setPropertyInstances(org.apache.commons.collections.MultiMap property_instances)
Sets all the property instances in MM

Parameters:
property_instances - A MultiMap with (String)property instance uris as keys and RDF_PropertyInstance objects as values The reason for the use of multimap is that there may be more than one property instances wuth the same uri "connecting" different resources

addPropertyInstance

void addPropertyInstance(IRDF_PropertyInstance property_instance)
Adds a property instance in MM

Parameters:
property_instance - An RDF_PropertyInstance object

getPropertyInstance

java.util.Collection getPropertyInstance(java.lang.String property_instance_uri)
Retrieves a property instance given its uri

Parameters:
property_instance_uri - A String
Returns:
An Collection object

getClassInstances

java.util.HashMap getClassInstances()
Retrieves all class instances from MM

Returns:
A HashMap with keys (String) class instance uris and values RDF_ClassInstance objects

setClassInstances

void setClassInstances(java.util.HashMap class_instances)
Sets all the class instances in MM

Parameters:
class_instances - A HashMap with (String)class instance uris as keys and RDF_ClassInstance objects as values

addClassInstance

void addClassInstance(IRDF_Individual class_instance)
Adds a class instance in MM

Parameters:
class_instance - An RDF_ClassInstance object

getClassInstance

IRDF_Individual getClassInstance(java.lang.String class_instance_uri)
Retrieves a class instance given its uri

Parameters:
class_instance_uri - A String
Returns:
An RDF_ClassInstance object

getContainers

java.util.HashMap getContainers()
Retrieves all containers from MM

Returns:
A HashMap with keys (String) container uris and values RDF_Container objects

setContainers

void setContainers(java.util.HashMap containers)
Sets all the containers in MM

Parameters:
containers - A HashMap with (String)container uris as keys and RDF_Container objects as values

addContainer

void addContainer(IRDF_Container container)
Adds a container in MM

Parameters:
container - An RDF_Container object

getContainer

IRDF_Container getContainer(java.lang.String container_uri)
Retrieves a container given its uri

Parameters:
container_uri - A String
Returns:
An RDF_Container object

read

void read(java.io.InputStream file,
          java.lang.String base_uri,
          java.lang.String triple_format,
          boolean fetch_dependencies,
          boolean strict)
          throws java.lang.Exception
Receives input from an Input Stream an loads the corresponding namespaces/graphspaces to the model The base_uri given as a parameter should be the same as the one included in the file(if one)

Parameters:
file - An RDF/XML or TRIG Input Stream
base_uri - The base uri of the file.
triple_format - RDF_Model.RDF_XML( For rdf/xml files),RDF_Model.TRIG( for trig files)
fetch_dependencies - If true all the dependent namespacies will be fetched from their actual location(Requires
strict - boolean If true the model will perform all the necessary cross checks while building. In the other case it will perform a "good will" building supposing that the input files are already tested! a valid uri to be set)
Throws:
java.io.IOException - In case the input stream is malformed
gr.forth.ics.rdfsuite.services.exceptions.ParsingException - In case something went wrong in the parsing of the file
gr.forth.ics.rdfsuite.services.exceptions.TrigException - In case the trig parser throws an Exception
gr.forth.ics.rdfsuite.services.exceptions.InvalidTripleFormatException - in case parameter triple format is not one of the predefined values
java.lang.Exception

read

void read(java.lang.String file_name,
          java.lang.String base_uri,
          java.lang.String triple_format,
          boolean fetch_dependencies,
          boolean strict)
          throws java.io.FileNotFoundException,
                 java.lang.Exception
Receives input from a file an loads the corresponding namespaces/graphspaces to the model The base_uri given as a parameter should be the same as the one included in the file(if one)

Parameters:
file_name - A String
base_uri - The base uri of the file.
triple_format - RDF_Model.RDF_XML( For rdf/xml files),RDF_Model.TRIG( for trig files)
fetch_dependencies - If true all the dependent namespacies will be fetched from their actual location(Requires a valid uri to be set)
strict - boolean If true the model will perform all the necessary cross checks while building. In the other case it will perform a "good will" building supposing that the input files are already tested!
Throws:
java.io.FileNotFoundException
java.io.IOException - In case the input stream is malformed
gr.forth.ics.rdfsuite.services.exceptions.ParsingException - In case something went wrong in the parsing of the file
gr.forth.ics.rdfsuite.services.exceptions.TrigException - In case the trig parser throws an Exception
gr.forth.ics.rdfsuite.services.exceptions.InvalidTripleFormatException - in case parameter triple format is not one of the predefined values
java.lang.Exception

readAll

void readAll(java.util.Map<java.lang.String,java.lang.String> files,
             java.lang.String triple_format,
             boolean fetch_dependencies,
             boolean strict)
             throws java.sql.SQLException,
                    java.lang.ClassNotFoundException,
                    java.io.IOException,
                    gr.forth.ics.rdfsuite.services.exceptions.ParsingException,
                    gr.forth.ics.rdfsuite.services.exceptions.TrigException,
                    gr.forth.ics.rdfsuite.services.exceptions.InvalidTripleFormatException,
                    java.io.IOException
Receives all the available files in a Map along with their uris and makes sure they are parsed in the correct order resolving any possible dependencies between them. Developers who want to load in a Model a set of files and do not actually know their "correct" order are highly encouraged to use this method

Parameters:
files - An Map with the input files. Key of the Map should be the uri and value an String with the file(CAUTION:This is not the path to the file but the file itself).
triple_format - RDF_Model.RDF_XML( For rdf/xml files),RDF_Model.TRIG( for trig files)
fetch_dependencies - If true all the dependent namespacies will be fetched from their actual location(Requires a valid uri to be set)
strict - boolean If true the model will perform all the necessary cross checks while building. In the other case it will perform a "good will" building supposing that the input files are already tested!
Throws:
java.sql.SQLException - For compliance to RDFDB_Model.read
java.lang.ClassNotFoundException - For compliance to RDFDB_Model.read
java.io.IOException - In case some input stream is malformed
gr.forth.ics.rdfsuite.services.exceptions.ParsingException - In case something went wrong in the parsing of the file
gr.forth.ics.rdfsuite.services.exceptions.TrigException - In case the trig parser throws an Exception
gr.forth.ics.rdfsuite.services.exceptions.InvalidTripleFormatException - in case parameter triple format is not one of the predefined values

getAvailableStreams

AvailableStreams getAvailableStreams()
Retrieves the Available namespace streams for building this model

Returns:
An AvailableStreams object

setAvailableStreams

void setAvailableStreams(AvailableStreams avail)
Sets the available namespace streams for fetching uris for building this model

Parameters:
avail - An AvailableStreams object

createClassDag

RDF_DAG createClassDag()
Creates the subsumption dag for all the model's classes

Returns:
An RDF_DAG

createMetaClassDag

RDF_DAG createMetaClassDag()
Creates the subsumption dag for all the model's metaclass

Returns:
An RDF_DAG

createPropertyDag

RDF_DAG createPropertyDag()
Creates the subsumprion dag for all the model's properties

Returns:
An RDF_DAG

createMetaPropertyDag

RDF_DAG createMetaPropertyDag()
Creates the subsumprion dag for all the model's metaproperties

Returns:
An RDF_DAG

createDags

void createDags()
Creates the subsumption dags for classes,proeprties,metaclasses,metaproperties. The creation of the dags is necessary for the label creation


createLabels

void createLabels()
                  throws java.lang.Exception
Given the class dag,property dag,metaclass dag nad metaproperty dag for this model assignes a unique label to each resource of the model

Throws:
java.sql.SQLException
java.lang.Exception

getSubClasses

org.apache.commons.collections.MultiMap getSubClasses()
Retrieves all the subClass relations stored in main memory

Returns:
A MultiMap with keys RDF_Class objects and values collections of RDF_SubClass objects

setSubClasses

void setSubClasses(org.apache.commons.collections.MultiMap sub_classes)
Sets the subClass Relationships defined in this namespace

Parameters:
sub_classes - A MultiMap with keys RDF_Class objects and values collections of RDF_SubClass objects

setSuperClassesOf

void setSuperClassesOf(IRDF_Class rdf_class,
                       java.util.Collection<IRDF_SubClass> sub_classes)
Sets the superclasses of a single class

Parameters:
rdf_class -
sub_classes -

getSuperClassOf

java.util.Collection<IRDF_SubClass> getSuperClassOf(IRDF_Class rdf_class)
retrieves the subclasses of this class

Parameters:
rdf_class - An RDF_Class
Returns:
An Collection object

getSubClassOf

java.util.Collection<IRDF_SubClass> getSubClassOf(IRDF_Class rdf_class)
Retrieves the superclasses of this class

Parameters:
rdf_class - An RDF_Class
Returns:
An Collection object

addSubClass

void addSubClass(IRDF_Class rdf_class,
                 IRDF_SubClass subclass)
Adds a subClass relation in Main Memory

Parameters:
subclass -

getSubProperties

org.apache.commons.collections.MultiMap getSubProperties()
Retrieves all the subProperty relations stored in main memory

Returns:
A MultiMap with keys RDF_Property objects and values collections of RDF_SubProperty objects

setSubProperties

void setSubProperties(org.apache.commons.collections.MultiMap sub_properies)
Sets the subProperty Relationships defined in this namespace

Parameters:
sub_properies - A MultiMap with keys RDF_Property objects and values collections of RDF_SubProperty objects

setSubProperties

void setSubProperties(IRDF_Property property,
                      java.util.Collection<IRDF_SubProperty> sub_properies)
Sets the superproperties of a single property

Parameters:
property -
sub_properies -

getSubProperty

java.util.Collection<IRDF_SubProperty> getSubProperty(IRDF_Property rdf_property)
Retrieves the subproperties of this class

Parameters:
rdf_property - An RDF_Property
Returns:
An Collection object

getSuperProperty

java.util.Collection<IRDF_SubProperty> getSuperProperty(IRDF_Property rdf_property)
Retrieves the superproperties of this class

Parameters:
rdf_property - An RDF_Property
Returns:
An Collection object

addSubProperty

void addSubProperty(IRDF_Property property,
                    IRDF_SubProperty subproperty)
Adds a subProperty relation in Main Memory

Parameters:
subproperty -

getTypes

org.apache.commons.collections.MultiMap getTypes()
Retrieves all the type relations stored in main memory

Returns:
A MultiMap with keys RDF_Resource objects and values collections of RDF_Type objects

setTypes

void setTypes(org.apache.commons.collections.MultiMap types)
Sets the type Relationships defined in this namespace

Parameters:
types - A MultiMap with keys RDF_Resource objects and values collections of RDF_Type objects

setTypes

void setTypes(IRDF_Resource resource,
              java.util.Collection<IRDF_Type> types)
Sets the types of a single resource

Parameters:
resource -
types -

getType

java.util.Collection<IRDF_Type> getType(IRDF_Resource rdf_type)
Retrieves the Collection of RDF_Type objects in which rdf_type "participates"

Parameters:
rdf_type - An RDF_Resource
Returns:
An Collection object

getInstances

java.util.Collection<IRDF_Type> getInstances(IRDF_Class rdf_class)
Retrieves the Collection of RDF_Type objects in which the given class "participates" as the type class. In other words retrieves the instance triples of this class

Parameters:
rdf_class - An IRDF_Class
Returns:
An Collection object

addType

void addType(IRDF_Resource resource,
             IRDF_Type type)
Adds a type relation in Main Memory

Parameters:
type -

getDomains

org.apache.commons.collections.MultiMap getDomains()
Retrieves all the domain relations stored in main memory

Returns:
A MultiMap with keys RDF_Property objects and values collections of RDF_Domains objects

setDomains

void setDomains(org.apache.commons.collections.MultiMap domains)
Sets the domain Relationships defined in this namespace

Parameters:
domains - A MultiMap with keys RDF_Property objects and values collections of RDF_Domains objects

setDomains

void setDomains(IRDF_Property property,
                java.util.Collection<IRDF_Domain> domains)
Sets the domains of a single property

Parameters:
property -
domains -

getDomain

java.util.Collection getDomain(IRDF_Property rdf_property)
Retrieves the Collection of RDF_Domains objects in which rdf_property "participates"

Parameters:
rdf_property - An RDF_Property
Returns:
An Collection object

addDomain

void addDomain(IRDF_Property property,
               IRDF_Domain domain)
Adds a domain relation in Main Memory

Parameters:
domain -

getRanges

org.apache.commons.collections.MultiMap getRanges()
Retrieves all the range relations stored in main memory

Returns:
A MultiMap with keys IRDF_Property objects and values collections of RDF_Range objects

setRanges

void setRanges(org.apache.commons.collections.MultiMap ranges)
Sets the range Relationships defined in this namespace

Parameters:
ranges - A MultiMap with keys IRDF_Property objects and values collections of RDF_Range objects

setRanges

void setRanges(IRDF_Property property,
               java.util.Collection<IRDF_Range> ranges)
Sets the ranges of a single property

Parameters:
property -
ranges -

getRange

java.util.Collection getRange(IRDF_Property rdf_property)
Retrieves the Collection of RDF_Range objects in which rdf_property "participates"

Parameters:
rdf_property - An IRDF_Property
Returns:
An Collection object

addRange

void addRange(IRDF_Property property,
              IRDF_Range range)
Adds a range relation in Main Memory

Parameters:
range -

getComments

org.apache.commons.collections.MultiMap getComments()
Retrieves all the comment relations stored in main memory

Returns:
A MultiMap with keys RDF_Resource objects and values collections of RDF_Comment objects

setComments

void setComments(org.apache.commons.collections.MultiMap comments)
Sets the comment Relationships defined in this namespace

Parameters:
comments - A MultiMap with keys RDF_Resource objects and values collections of RDF_Comment objects

setComments

void setComments(IRDF_Resource resource,
                 java.util.Collection<IRDF_Comment> comments)
Sets the comments of a single resource

Parameters:
resource -
comments -

getComment

java.util.Collection getComment(IRDF_Resource rdf_resource)
Retrieves the Collection of RDF_Comment objects in which rdf_resource "participates"

Parameters:
rdf_resource - An RDF_Resource
Returns:
An Collection object

addComment

void addComment(IRDF_Resource resource,
                IRDF_Comment comment)
Adds a comment relation in Main Memory

Parameters:
comment -

getLabels

org.apache.commons.collections.MultiMap getLabels()
Retrieves all the label relations stored in main memory

Returns:
A MultiMap with keys RDF_Resource objects and values collections of RDF_Label objects

setLabels

void setLabels(org.apache.commons.collections.MultiMap labels)
Sets the label Relationships defined in this namespace

Parameters:
labels - A MultiMap with keys RDF_Resource objects and values collections of RDF_Label objects

setLabels

void setLabels(IRDF_Resource resource,
               java.util.Collection<IRDF_Label> labels)
Sets the labels of a single resource

Parameters:
resource -
labels -

getLabel

java.util.Collection getLabel(IRDF_Resource rdf_resource)
Retrieves the Collection of RDF_Label objects in which rdf_resource "participates"

Parameters:
rdf_resource - An RDF_Resource
Returns:
An Collection object

addLabel

void addLabel(IRDF_Resource resource,
              IRDF_Label label)
Adds a label relation in Main Memory

Parameters:
label -

getSeeAlsos

org.apache.commons.collections.MultiMap getSeeAlsos()
Retrieves all the seeAlso relations stored in main memory

Returns:
A MultiMap with keys IRDF_Resource objects and values collections of RDF_SeeAlso objects

setSeeAlsos

void setSeeAlsos(org.apache.commons.collections.MultiMap see_alsos)
Sets the seeAlso Relationships defined in this namespace

Parameters:
see_alsos - A MultiMap with keys IRDF_Resource objects and values collections of RDF_SeeAlso objects

setSeeAlsos

void setSeeAlsos(IRDF_Resource resource,
                 java.util.Collection<IRDF_SeeAlso> see_alsos)
Sets the see alsos of a single resource

Parameters:
resource -
see_alsos -

getSeeAlso

java.util.Collection getSeeAlso(IRDF_Resource rdf_resource)
Retrieves the Collection of RDF_SeeAlso objects in which rdf_resource "participates"

Parameters:
rdf_resource - An IRDF_Resource
Returns:
An Collection object

addSeeAlso

void addSeeAlso(IRDF_Resource resource,
                IRDF_SeeAlso seealso)
Adds a seeAlso relation in Main Memory

Parameters:
seealso -

getIsDefinedBys

org.apache.commons.collections.MultiMap getIsDefinedBys()
Retrieves all the isDefinedBy relations stored in main memory

Returns:
A MultiMap with keys IRDF_Resource objects and values collections of RDF_IsDefinedBy objects

setIsDefinedBys

void setIsDefinedBys(org.apache.commons.collections.MultiMap is_defined_bys)
Sets the isDefinedBy Relationships defined in this namespace

Parameters:
is_defined_bys - A MultiMap with keys IRDF_Resource objects and values collections of RDF_IsDefinedBy objects

setIsDefinedBys

void setIsDefinedBys(IRDF_Resource resource,
                     java.util.Collection<IRDF_IsDefinedBy> is_defined_bys)
Sets the isDefinedBys of a single resource

Parameters:
resource -
is_defined_bys -

getIsDefinedBy

java.util.Collection getIsDefinedBy(IRDF_Resource rdf_resource)
Retrieves the Collection of RDF_IsDefinedBy objects in which rdf_resource "participates"

Parameters:
rdf_resource - An IRDF_Resource
Returns:
An Collection object

addIsDefinedBy

void addIsDefinedBy(IRDF_Resource resource,
                    IRDF_IsDefinedBy isdefinedby)
Adds a isDefinedBy relation in Main Memory

Parameters:
isdefinedby -

getSubjects

java.util.HashMap<IRDF_Statement,IRDF_Subject> getSubjects()
Retrieves all the subject relations stored in main memory

Returns:
A MultiMap with keys RDF_Statement objects and values collections of RDF_Subject objects

setSubjects

void setSubjects(java.util.HashMap<IRDF_Statement,IRDF_Subject> subjects)
Sets the subject Relationships defined in this namespace

Parameters:
subjects - A MultiMap with keys RDF_Statement objects and values collections of RDF_Subject objects

getSubject

IRDF_Subject getSubject(IRDF_Statement rdf_statement)
Retrieves the Collection of RDF_Subject objects in which rdf_statement "participates"

Parameters:
rdf_statement - An RDF_Statement
Returns:
An Collection object

addSubject

void addSubject(IRDF_Statement statement,
                IRDF_Subject subject)
Adds a subject relation in Main Memory

Parameters:
subject -

getObjects

java.util.HashMap<IRDF_Statement,IRDF_Object> getObjects()
Retrieves all the object relations stored in main memory

Returns:
A MultiMap with keys IRDF_Statement objects and values collections of RDF_Object objects

setObjects

void setObjects(java.util.HashMap<IRDF_Statement,IRDF_Object> objects)
Sets the object Relationships defined in this namespace

Parameters:
objects - A MultiMap with keys IRDF_Statement objects and values collections of RDF_Object objects

getObject

IRDF_Object getObject(IRDF_Statement rdf_statement)
Retrieves the Collection of RDF_Object objects in which rdf_statement "participates"

Parameters:
rdf_statement - An IRDF_Statement
Returns:
An Collection object

addObject

void addObject(IRDF_Statement statement,
               IRDF_Object object)
Adds a object relation in Main Memory

Parameters:
object -

getPredicates

java.util.HashMap<IRDF_Statement,IRDF_Predicate> getPredicates()
Retrieves all the predicate relations stored in main memory

Returns:
A MultiMap with keys IRDF_Statement objects and values collections of RDF_Predicate objects

setPredicates

void setPredicates(java.util.HashMap<IRDF_Statement,IRDF_Predicate> predicates)
Sets the predicate Relationships defined in this namespace

Parameters:
statements - A MultiMap with keys IRDF_Statement objects and values collections of RDF_Predicate objects

getPredicate

IRDF_Predicate getPredicate(IRDF_Statement statement)
Retrieves the Collection of RDF_Predicate objects in which statement "participates"

Parameters:
statement - An IRDF_Statement
Returns:
An Collection object

addPredicate

void addPredicate(IRDF_Statement statement,
                  IRDF_Predicate predicate)
Adds a predicate relation in Main Memory

Parameters:
predicate -

getMembers

org.apache.commons.collections.MultiMap getMembers()
Retrieves all the container membership relations stored in main memory

Returns:
A MultiMap with keys RDF_Container objects and values collections of RDF_Member objects

setMembers

void setMembers(org.apache.commons.collections.MultiMap members)
Sets the container membership Relationships defined in this namespace

Parameters:
members - A MultiMap with keys RDF_Container objects and values collections of RDF_Member objects

getMember

java.util.Collection getMember(IRDF_Container container)
Retrieves the Collection of RDF_Member objects in which rdf_container "participates"

Parameters:
container - An RDF_Container
Returns:
An Collection object

addMember

void addMember(IRDF_Container container,
               IRDF_Member member)
Adds a member relation in Main Memory

Parameters:
member -

toTriples

java.util.Collection toTriples(boolean setOnly)
This method produces the statements(triples) that derive out of the Collection of namespaces and graphspaces constituting this model by calling the corresponding toTriples() methods from each namespace/graphspace in the Collections accordingly.

Parameters:
setOnly - false if you want triples from all model namespaces including the default ones(RDFSchema,RDFNS,XMLSchema) else true
Returns:
A Collection of Collection objects. By convention the subject of the first triple can be assumed to be in get(0).get(0),the predicate in get(0).get(1) and the object in get(0).get(2)

toTriples

java.util.Collection toTriples(java.lang.String uri)
This method produces the statements(triples) that derive out of the namespace or graphspace described by the given uri

Parameters:
uri - The uri of the namespace/graphspace whose triples are wanted
Returns:
A Collection of Collection objects. By convention the subject of the first triple can be assumed to be in get(0).get(0),the predicate in get(0).get(1) and the object in get(0).get(2)

validate

void validate()
              throws java.lang.Exception
Performs a validation of the schema and data loaded in main memory

Throws:
java.lang.Exception

retrieveResource

IRDF_Resource retrieveResource(java.lang.String uri)
Retrieves the resource withthe given uri from its namesapce( if exists)

Parameters:
uri - The String uri of the resource
Returns:
An IRDF_Resource

retrieveTriples

java.util.Iterator<IRDF_Triple> retrieveTriples(java.lang.String subject,
                                                java.lang.String predicate,
                                                java.lang.String object)
Retrieves the triples (if any) with the given subject,predicate and/or object In case subject,predicate or object has value null this implies matching any.

Parameters:
subject - String The subject of the triple
predicate - String The predicate of the triple
object - String The object of the triple
Returns:
An Iterator of IRDF_Triples. The triples that match the criteria.

retrieveTriples

java.util.Iterator<IRDF_Triple> retrieveTriples(IRDF_Resource subject,
                                                IRDF_Property predicate,
                                                java.lang.Object object)
Retrieves the triples (if any) with the given subject, predicate and/or object In case subject,predicate or object has value null this implies matching any.

Parameters:
subject - The subject of the triple
predicate - The predicate of the triple
object - The object of the triple
Returns:
An Iterator of IRDF_Triples. The triples that match the criteria.

write_file

java.util.Map<java.lang.String,java.io.File> write_file(java.lang.String output_path,
                                                        java.lang.String triple_format,
                                                        java.lang.String output_base_uri,
                                                        boolean setOnly,
                                                        boolean multiple)
                                                        throws java.io.FileNotFoundException,
                                                               java.lang.Exception
This method outputs the the namespaces/graphspaces correlated to this model in one or more output files according to the value of parameter multiple. The files are written in the given output_path and have as name the local_name of the the namespaces/graphpspaces The alternative values for the format of the generated triples are RDF_Model.RDF_XML(unimplemented), RDF_Model.TRIG

Parameters:
output_path - The file system path where the file(s)
triple_format - A String containing the format of the output that will be created(RDF_Model.RDF_XML(unimplemented) or RDF_Model.TRIG)
output_base_uri - output_base_uri The uri describing the output string in case we want all namespaces/graphspaces outputed in one single string which is the case when parameter multiple takes value false. If parameter multiple takes value true this uri is ignored because the actual namespace/graphspace uris are used
setOnly - false if you want ALL the triples of the model including RDFSchema,RDFNS,XMLSchema else true be outputed to a single one.
multiple - If true each namespace and graphspace will be outputed to a different String else they will all be outputed to a single one.
Returns:
Map A Map with key the URI of the namespace/graphspace written in the file and as value the File pointer
Throws:
java.lang.Exception
java.io.FileNotFoundException

write_string

java.util.Map write_string(java.lang.String triple_format,
                           java.lang.String output_base_uri,
                           boolean setOnly,
                           boolean multiple)
                           throws java.io.FileNotFoundException,
                                  java.lang.Exception
This method outputs the namespaces/graphspaces correlated to this model in a HashMap of pairs where the key is the namespace/graphspace uri and the value is the actual namespace/graphspace. The alternative values for the format of the generated triples are RDF_Model.TRIG

Parameters:
triple_format - A String containing the format of the output that will be created(RDF_Model.RDF_XML(unimplemented) or RDF_Model.TRIG)
output_base_uri - The uri describing the output string in case we want all namespaces/graphspaces outputed in one single string which is the case when parameter multiple takes value false. If parameter multiple takes value true this uri is ignored because the actual namespace/graphspace uris are used
setOnly - false if you want ALL the triples of the model including RDFSchema,RDFNS,XMLSchema else true
multiple - If true each namespace and graphspace will be outputed to a different String else they will all be outputed to a single one.
Throws:
java.lang.Exception
java.io.FileNotFoundException

write_original_and_inferred_in_file

java.util.Map<java.lang.String,java.io.File> write_original_and_inferred_in_file(java.lang.String output_path,
                                                                                 java.lang.String triple_format,
                                                                                 java.lang.String output_base_uri,
                                                                                 boolean setOnly,
                                                                                 boolean multiple)
                                                                                 throws java.io.FileNotFoundException,
                                                                                        java.lang.Exception
This method writes in files both the original triples steming from the source files and the inferred triples created arbitrarily from the model to make it complete( in case the original files were not complete) Example: If a file contains only triple A subClassOf B, the model will add A type Class and B type Class triples. The first is considered as original while the two last as inferred This method outputs the the namespaces/graphspaces correlated to this model in one or more output files according to the value of parameter multiple. The files are written in the given output_path and have as name the local_name of the the namespaces/graphpspaces The alternative values for the format of the generated triples are RDF_Model.RDF_XML(unimplemented), RDF_Model.TRIG

Parameters:
output_path - The file system path where the file(s)
triple_format - A String containing the format of the output that will be created(RDF_Model.RDF_XML(unimplemented) or RDF_Model.TRIG)
output_base_uri - output_base_uri The uri describing the output string in case we want all namespaces/graphspaces outputed in one single string which is the case when parameter multiple takes value false. If parameter multiple takes value true this uri is ignored because the actual namespace/graphspace uris are used
setOnly - false if you want ALL the triples of the model including RDFSchema,RDFNS,XMLSchema else true be outputed to a single one.
multiple - If true each namespace and graphspace will be outputed to a different String else they will all be outputed to a single one.
Returns:
Map A Map with key the URI of the namespace/graphspace written in the file and as value the File pointer If the returned is a graphspace the key will be of the form a#graph_name. Notice that the returned file/string cannot be "redirected" to RDF_Model.read method with base_uri the key of the map, since the graph_uri is not the base_uri of the file.
Throws:
java.lang.Exception
java.io.FileNotFoundException

write_original_and_inferred_in_string

java.util.Map write_original_and_inferred_in_string(java.lang.String triple_format,
                                                    java.lang.String output_base_uri,
                                                    boolean setOnly,
                                                    boolean multiple)
                                                    throws java.io.FileNotFoundException,
                                                           java.lang.Exception
This method writes in strings both the original triples steming from the source files and the inferred triples created arbitrarily from the model to make it complete( in case the original files were not complete) Example: If a file contains only triple A subClassOf B, the model will add A type Class and B type Class triples. The first is considered as original while the two last as inferred This method outputs the namespaces/graphspaces correlated to this model in a HashMap of pairs where the key is the namespace/graphspace uri and the value is the actual namespace/graphspace. The alternative values for the format of the generated triples are RDF_Model.TRIG

Parameters:
triple_format - A String containing the format of the output that will be created(RDF_Model.RDF_XML(unimplemented) or RDF_Model.TRIG)
output_base_uri - The uri describing the output string in case we want all namespaces/graphspaces outputed in one single string which is the case when parameter multiple takes value false. If parameter multiple takes value true this uri is ignored because the actual namespace/graphspace uris are used
setOnly - false if you want ALL the triples of the model including RDFSchema,RDFNS,XMLSchema else true
multiple - If true each namespace and graphspace will be outputed to a different String else they will all be outputed to a single one.
Throws:
java.lang.Exception
java.io.FileNotFoundException

getClasses

java.util.Collection<IRDF_Class> getClasses(boolean considerRDFNS,
                                            boolean considerXSDNS)

getProperties

java.util.Collection<IRDF_Property> getProperties(boolean considerRDFNS,
                                                  boolean considerXSDNS)

addStatement

boolean addStatement(java.lang.String subject,
                     java.lang.String predicate,
                     java.lang.String object,
                     java.lang.String namespace_uri,
                     java.lang.String graphspace_uri,
                     Position pos)
                     throws gr.forth.ics.rdfsuite.services.exceptions.TripleCreationException
Explicitly adds a string triple in the given namespace,graphspace When this method is not called iternally by the model, the default namespaces, rdf_scheme,rdf.xml_schema,rdfsuite should be imported using the appropriate import methods in the model. If not an exception is thrown

Parameters:
subject - The subject of the triple
predicate - The predicate of the triple
object - The object of the triple
namespace_uri - The namespace to add the triple
graphspace_uri - The graphspace to add the triple
pos - The position of the triple in the file, null if the method is used to explicitly add a triple to the model
Throws:
gr.forth.ics.rdfsuite.services.exceptions.TripleCreationException - If the default namespaces (RDFSchema,RDF,XMLSchema,RDFSuite) have not yet been imported when the method is called

eliminateRedundancies

void eliminateRedundancies()
                           throws java.lang.Exception
Makes the model redundant free. CAUTION. Original information may be lost after calling this service since triples may need to be DELETED in order for the model to become redundancy free

Throws:
java.lang.Exception

import_default_namespaces

void import_default_namespaces()
This method loads in MM RDF and RDFSchema Namespaces


import_xmlschema_namespace

void import_xmlschema_namespace()
This method loads in MM the xmlschema namespace


import_rdfsuite_namespace

void import_rdfsuite_namespace()
This method loads in MM the RDFSuite Namespace


getOrCreateGraphspace

IRDF_Graphspace getOrCreateGraphspace(java.lang.String graphspace_uri)
This method retrieves an RDF_Graphspace with a given uri. If it does not exist it creates it

Parameters:
graphspace_uri - the uri of the graphspace
Returns:
the IRDF_Graphspace that was retrieved or created

getOrCreateNamespace

IRDF_Namespace getOrCreateNamespace(java.lang.String namespace_uri)
This method retrieves an RDF_Namespace with a given uri from MM. If it does not exist it creates it

Parameters:
namespace_uri - the uri of the namespace
Returns:
the IRDF_Namespace that was retrieved or created

import_namespaces

void import_namespaces(java.util.ArrayList import_namespaces,
                       java.lang.String base_uri)
                       throws gr.forth.ics.rdfsuite.services.exceptions.ParsingException
This method loads all the namespaces specified in the import_namespaces parameter in the model.

Parameters:
import_namespaces - the namespaces to be loaded in the model
base_uri - the base uri
Throws:
gr.forth.ics.rdfsuite.services.exceptions.ParsingException

import_graphspaces

void import_graphspaces(java.util.ArrayList import_graphspaces,
                        java.lang.String base_uri)
                        throws gr.forth.ics.rdfsuite.services.exceptions.ParsingException
This method loads all the graphspaces specified in the import_graphspaces parameter in the model.

Parameters:
import_graphspaces - the graphspaces to be loaded in the model
base_uri - the base uri
Throws:
gr.forth.ics.rdfsuite.services.exceptions.ParsingException

getPropertyInstanceWithSubjectAndObject

java.util.Collection<IRDF_PropertyInstance> getPropertyInstanceWithSubjectAndObject(java.lang.String subject,
                                                                                    java.lang.String object)
Retrieves all the property instances with the given subject and object

Parameters:
subject -
object -
Returns:
A Collection

getPropertyInstanceWithSubjectPredicateAndObject

IRDF_PropertyInstance getPropertyInstanceWithSubjectPredicateAndObject(java.lang.String subject,
                                                                       java.lang.String property_instance_uri,
                                                                       java.lang.String object)
                                                                       throws gr.forth.ics.rdfsuite.services.exceptions.TripleCreationException
Retrieves all the property instances with the given subject,predicate,object

Parameters:
subject -
property_instance_uri -
object -
Returns:
An IRDF_PropertyInstance
Throws:
gr.forth.ics.rdfsuite.services.exceptions.TripleCreationException

getLabelsCreated

boolean getLabelsCreated()
Returns true if labels are created for this model


setLabelsCreated

void setLabelsCreated(boolean created)
Sets whether labels are created for this model

Parameters:
created - true if labels are created else false