|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.stanford.db.rdf.schema.RDFSchemaModel
RDF schema model supports subclassing and validates RDF schemas.
| Constructor Summary | |
RDFSchemaModel()
|
|
RDFSchemaModel(Model instances,
Model closure)
Creates a schema model, closure must contain transitive closures of subClassOf and subPropertyOf |
|
RDFSchemaModel(NodeFactory f)
|
|
RDFSchemaModel(NodeFactory f,
Model instances,
Model closure)
|
|
| Method Summary | |
void |
add(Statement t)
Adds a new triple to the model. |
static Model |
computeClosure(Model src,
Resource property)
Compute a transitive closure, disallow loops. |
static Model |
computeClosure(Model src,
Resource property,
boolean allowLoops)
Computes a transitive closure on a given predicate. |
static Model |
computeRDFSClosure(Model src)
|
boolean |
contains(Statement t)
Tests if the model contains the given triple. |
Model |
create()
Creates empty model of the same Class |
Model |
duplicate()
Clone the model. |
java.util.Enumeration |
elements()
Enumerate triples |
Model |
find(Resource subject,
Resource predicate,
RDFNode object)
General method to search for triples. |
Model |
getGroundModel()
|
java.lang.String |
getLabel()
The formal string label of the node. |
java.lang.String |
getLocalName()
Returns the local name of the resource. |
java.lang.String |
getNamespace()
Returns the namespace of the resource. |
NodeFactory |
getNodeFactory()
Returns the node factory for this model |
java.lang.String |
getSourceURI()
Returns current base URI setting. |
java.lang.String |
getURI()
Returns the URI of the resource. |
boolean |
isEmpty()
true if the model contains no triples |
boolean |
isMutable()
True if the model supports add() and remove() methods. |
static void |
main(java.lang.String[] args)
|
static void |
readModelsFromArgList(RDFFactory f,
Model m,
Model rawSchema,
java.lang.String[] args)
|
void |
remove(Statement t)
Removes the triple from the model. |
void |
setSourceURI(java.lang.String uri)
Set a base URI for the model. |
int |
size()
Number of triples in the model |
java.lang.String |
toString()
|
static void |
validate(Model instances,
Model schema)
Validates the model. |
static void |
validateRawSchema(Model rawInstances,
Model rawSchema)
Validates rawInstances model agains schema in rawSchema |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RDFSchemaModel()
public RDFSchemaModel(Model instances,
Model closure)
public RDFSchemaModel(NodeFactory f)
public RDFSchemaModel(NodeFactory f,
Model instances,
Model closure)
| Method Detail |
public java.lang.String getLabel()
throws ModelException
RDFNodegetLabel in interface RDFNode
public java.lang.String getURI()
throws ModelException
ResourcegetURI in interface Resourceorg.w3c.rdf.model.ResourceStatement,
Model
public java.lang.String getLocalName()
throws ModelException
ResourcegetLocalName in interface Resourceorg.w3c.rdf.model.ResourceStatement,
Model
public java.lang.String getNamespace()
throws ModelException
ResourcegetNamespace in interface Resourceorg.w3c.rdf.model.ResourceStatement,
Model
public Model getGroundModel()
throws ModelException
getGroundModel in interface VirtualModel
public void setSourceURI(java.lang.String uri)
throws ModelException
setSourceURI in interface Model
public java.lang.String getSourceURI()
throws ModelException
getSourceURI in interface Model
public int size()
throws ModelException
size in interface Model
public boolean isEmpty()
throws ModelException
isEmpty in interface Model
public java.util.Enumeration elements()
throws ModelException
elements in interface Model
public boolean contains(Statement t)
throws ModelException
contains in interface Modeltrue if the triple belongs to the model;
false otherwise.
public void add(Statement t)
throws ModelException
add in interface Model
public void remove(Statement t)
throws ModelException
remove in interface Model
public Model find(Resource subject,
Resource predicate,
RDFNode object)
throws ModelException
null input for any parameter will match anything.
Example: Model result = m.find( null, RDF.type, new ResourceImpl("http://...#MyClass") )
finds all instances of the class MyClass
find in interface Model
public Model duplicate()
throws ModelException
duplicate in interface Model
public Model create()
throws ModelException
create in interface Model
public boolean isMutable()
throws ModelException
ModelisMutable in interface Model
public NodeFactory getNodeFactory()
throws ModelException
getNodeFactory in interface Modelpublic java.lang.String toString()
toString in class java.lang.Object
public static Model computeRDFSClosure(Model src)
throws ModelException
public static Model computeClosure(Model src,
Resource property)
throws ModelException
public static Model computeClosure(Model src,
Resource property,
boolean allowLoops)
throws ModelException
public static void validateRawSchema(Model rawInstances,
Model rawSchema)
throws ModelException
public static void validate(Model instances,
Model schema)
throws ModelException
public static void readModelsFromArgList(RDFFactory f,
Model m,
Model rawSchema,
java.lang.String[] args)
throws java.lang.Exception
public static void main(java.lang.String[] args)
throws java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||