eRqlEngine API documentation - http://www.wleklinski.de/rdf/

gr.forth.ics.vrp.corevrp.model
Class Model

java.lang.Object
  extended bygr.forth.ics.vrp.corevrp.model.Resource
      extended bygr.forth.ics.vrp.corevrp.model.Model
All Implemented Interfaces:
IModel

public class Model
extends Resource
implements IModel

Model.java - All we can do to a model.

Version:
2.5 (30 Januar 2003)
Author:
Karsten Tolle & Sofia Alexaki

Field Summary
 Existing existing
           
 
Constructor Summary
Model(boolean init)
          Create a new model.
 
Method Summary
 void addStatement(String pred, String subj, Object o)
          Entering a statement to the model.
 void castToMetaClass()
          Casts the classes that are subclasses of the rdfs:Class/rdf:Property to RDF_MetaClass Objects.
 boolean contains(String URI)
          Returns a boolean weather the resource having the specified URI is contained by the model.
 boolean contains(String pred, String sub, Literal obj)
          Returning a boolean whether the statement contained by the model.
 boolean contains(String pred, String sub, String obj)
          Returning a boolean whether the statement contained by the model.
 void dump()
          Dump the content of the model and print it to the outputfile defined in RDF_PAV/Main.
 void fetch_all(ArrayList ex_ns, parser par)
          Will be called by the parser if he reached the EOF of the current file.
 void fetch()
          Try to get all information of RDF_Properties and RDF_Classes we entered to the Model.
 void fetch(String URI)
          In the case the URI belongs to a namespace, we try to get the information about URI and enter them to our basis_model.
 String genSysID()
          Whenever a system-generated identifier is needed for statements or nodes.
 Collection getAllMetaClasses()
          Returning a Collection of all metaclasses contained by the model.
 String getBaseURI()
          Get the base URI for the model.
 Collection getClasses()
          Returning a Collection of all classes contained by the model.
 Collection getContainers()
          Returning a Collection of all RDF containers contained in the model.
 Collection getDataResources()
          Returns a Collection of all resources that don't belong to the basic RDF types i.e., rdfs:Class, rdf:Property, rdf:Container and rdf:Statement.
 Collection getMetaClasses()
          Returning a Collection of all metaclasses of classes contained by the model.
 Collection getMetaProperties()
          Returning a Collection of all metaclasses of properties contained by the model.
 Model getModelPart(HashSet selectedNS)
           
 HashMap getNamespaces()
          Returning a HashMap containing the URI and the object reference of all the external namespaces that have been parsed.
 Collection getNodes()
          Returning a Collection containing all the values of the existing HashMap.
 Collection getProperties()
          Returning a Collection of all properties contained by the model.
 Collection getReifiedStatements()
          Returning a Collection of all reified statements contained in the model.
 Resource getResource(int i)
           
 Resource getResource(String URI)
          Returns the resource with the specified URI.
 ArrayList getStatements()
          Returns the statements comprising the model.
 int[] getStatistics()
           
 boolean getverbose()
          Indicates whether messages about the actions performed by the VRP will be reported.
 void infer()
          To infer the type of the given classname for all instances of its subclasses (recursive).
 int printStatements()
          Prints the statements of this model.
 void printStatistics()
          Prints the statistic containing the number of triples, classes, properties, containers, refeid statements and resources to the output stream declared in Output.
 void setBaseURI(String bURI)
          Set the base URI for the model.
 void setNamespaces(HashMap ns)
           
 void setResourceRoot(boolean allClasses)
          Sets as superclass the class rdfs:Resource, if a class has no superclasses
 void setverbose(boolean b)
          Sets whether messages about the actions performed by the VRP will be reported.
 void solve_links()
           
 
Methods inherited from class gr.forth.ics.vrp.corevrp.model.Resource
getID, setID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

existing

public Existing existing
Constructor Detail

Model

public Model(boolean init)
Create a new model.

Method Detail

setverbose

public void setverbose(boolean b)
Sets whether messages about the actions performed by the VRP will be reported.

Specified by:
setverbose in interface IModel

getverbose

public boolean getverbose()
Indicates whether messages about the actions performed by the VRP will be reported.

Specified by:
getverbose in interface IModel

setNamespaces

public void setNamespaces(HashMap ns)

addStatement

public void addStatement(String pred,
                         String subj,
                         Object o)
Entering a statement to the model.

Specified by:
addStatement in interface IModel

getNodes

public Collection getNodes()
Returning a Collection containing all the values of the existing HashMap.

Specified by:
getNodes in interface IModel

contains

public boolean contains(String URI)
Returns a boolean weather the resource having the specified URI is contained by the model.

Specified by:
contains in interface IModel

getResource

public Resource getResource(String URI)
Returns the resource with the specified URI.

Specified by:
getResource in interface IModel

getResource

public Resource getResource(int i)

getClasses

public Collection getClasses()
Returning a Collection of all classes contained by the model.

Specified by:
getClasses in interface IModel

getAllMetaClasses

public Collection getAllMetaClasses()
Returning a Collection of all metaclasses contained by the model.


getMetaClasses

public Collection getMetaClasses()
Returning a Collection of all metaclasses of classes contained by the model.


getMetaProperties

public Collection getMetaProperties()
Returning a Collection of all metaclasses of properties contained by the model.


getProperties

public Collection getProperties()
Returning a Collection of all properties contained by the model.

Specified by:
getProperties in interface IModel

getReifiedStatements

public Collection getReifiedStatements()
Returning a Collection of all reified statements contained in the model.

Specified by:
getReifiedStatements in interface IModel

getContainers

public Collection getContainers()
Returning a Collection of all RDF containers contained in the model.

Specified by:
getContainers in interface IModel

getDataResources

public Collection getDataResources()
Returns a Collection of all resources that don't belong to the basic RDF types i.e., rdfs:Class, rdf:Property, rdf:Container and rdf:Statement.

Specified by:
getDataResources in interface IModel

contains

public boolean contains(String pred,
                        String sub,
                        String obj)
Returning a boolean whether the statement contained by the model.

Specified by:
contains in interface IModel

contains

public boolean contains(String pred,
                        String sub,
                        Literal obj)
Returning a boolean whether the statement contained by the model.

Specified by:
contains in interface IModel

getNamespaces

public HashMap getNamespaces()
Returning a HashMap containing the URI and the object reference of all the external namespaces that have been parsed.


fetch_all

public void fetch_all(ArrayList ex_ns,
                      parser par)
Will be called by the parser if he reached the EOF of the current file. The explicit stated namespaces are inside the Array List. The idea is to include everything in advance and do not allow to fetch during validation to provide a determinitic result of the validator. new since 08. Aug 2001 entered by Karsten Tolle

Specified by:
fetch_all in interface IModel

fetch

public void fetch()
Try to get all information of RDF_Properties and RDF_Classes we entered to the Model.

Specified by:
fetch in interface IModel

fetch

public void fetch(String URI)
In the case the URI belongs to a namespace, we try to get the information about URI and enter them to our basis_model. Moved from Validator to the Model 03. Aug. 2001 by KT

Specified by:
fetch in interface IModel

infer

public void infer()
To infer the type of the given classname for all instances of its subclasses (recursive). Will be used as an optional feature, at the beginning only for rdfs:Class and rdf:Property only.

Specified by:
infer in interface IModel

getStatements

public ArrayList getStatements()
Returns the statements comprising the model.

Specified by:
getStatements in interface IModel

printStatements

public int printStatements()
Prints the statements of this model.

Specified by:
printStatements in interface IModel

getStatistics

public int[] getStatistics()
Specified by:
getStatistics in interface IModel

printStatistics

public void printStatistics()
Prints the statistic containing the number of triples, classes, properties, containers, refeid statements and resources to the output stream declared in Output.

Specified by:
printStatistics in interface IModel

genSysID

public String genSysID()
Whenever a system-generated identifier is needed for statements or nodes. (Should this generate a URI instead? Right now you can use the getBaseURI() and combine it with the generated System ID to get a URI for some internal model resources).

Specified by:
genSysID in interface IModel

setBaseURI

public void setBaseURI(String bURI)
Set the base URI for the model.

Specified by:
setBaseURI in interface IModel

getBaseURI

public String getBaseURI()
Get the base URI for the model.

Specified by:
getBaseURI in interface IModel

dump

public void dump()
Dump the content of the model and print it to the outputfile defined in RDF_PAV/Main.

Specified by:
dump in interface IModel

solve_links

public void solve_links()

castToMetaClass

public void castToMetaClass()
Casts the classes that are subclasses of the rdfs:Class/rdf:Property to RDF_MetaClass Objects.


setResourceRoot

public void setResourceRoot(boolean allClasses)
Sets as superclass the class rdfs:Resource, if a class has no superclasses


getModelPart

public Model getModelPart(HashSet selectedNS)

eRqlEngine API documentation - http://www.wleklinski.de/rdf/