ch.hearc.I04_05s08.Ontology.RDF
Class RdfFile

java.lang.Object
  extended bych.hearc.I04_05s08.Ontology.OntFile
      extended bych.hearc.I04_05s08.Ontology.RDF.RdfFile

public class RdfFile
extends OntFile

An instance of some RDF Schema, a RDF File

Author:
Blanc, Yoan
See Also:
w3c
Licence:
MIT
Copyright:
2005 Yoan Blanc, HE-ARC Ing�nierie

Field Summary
private  LinkedList classes
          Class's instances composing the RDF file
private  LinkedList properties
          Property's instances composing the RDF Schema
private  RdfsFile[] rdfs
          RDF Schema's used in the file
 
Fields inherited from class ch.hearc.I04_05s08.Ontology.OntFile
 
Constructor Summary
RdfFile()
          Init the untitled RDF file
RdfFile(String filename)
          Init the RDF file
RdfFile(String filename, RdfsFile[] rdfs)
          Init the RDF file
 
Method Summary
 boolean add(InstanceOfClass c)
          Add a new instance of Class to the RDF
 boolean add(InstanceOfProperty prop)
          Add a new Property to the RDF Schema
 boolean del(InstanceOfClass c)
          Remove a Class from the RDF Schema
 boolean del(InstanceOfProperty prop)
          Delete the instance of Property
 InstanceOfClass getClass(String name)
          Get a class from his name
 InstanceOfClass[] getClasses()
          Get all classes members of the RDF Schema
 InstanceOfProperty[] getProperties()
          Get all properties members of the RDF Schema
 InstanceOfProperty getProperty(String name)
          Get a property from his name
 RdfsFile[] getRdfs()
          Get the RDFSchema of the file
 String toString()
          String representation of the file
 
Methods inherited from class ch.hearc.I04_05s08.Ontology.OntFile
close, getFilename, getName, getReader, setFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

classes

private LinkedList classes
Class's instances composing the RDF file


properties

private LinkedList properties
Property's instances composing the RDF Schema


rdfs

private RdfsFile[] rdfs
RDF Schema's used in the file

Constructor Detail

RdfFile

public RdfFile(String filename)
Init the RDF file

Parameters:
filename - the file's path

RdfFile

public RdfFile()
Init the untitled RDF file


RdfFile

public RdfFile(String filename,
               RdfsFile[] rdfs)
Init the RDF file

Parameters:
filename - the file's path
rdfs - Rdf Schemas
Method Detail

toString

public String toString()
String representation of the file

Overrides:
toString in class OntFile
Returns:
string representation

add

public boolean add(InstanceOfClass c)
Add a new instance of Class to the RDF

Parameters:
c - the instance class which would be add
Returns:
if the instance Class wasn't already listed

del

public boolean del(InstanceOfClass c)
Remove a Class from the RDF Schema

Parameters:
c - the class which would be deleted
Returns:
if the Class was successfuly removed

getClasses

public InstanceOfClass[] getClasses()
Get all classes members of the RDF Schema

Returns:
the class's instances

getClass

public InstanceOfClass getClass(String name)
Get a class from his name

Parameters:
name - class name
Returns:
a class

add

public boolean add(InstanceOfProperty prop)
Add a new Property to the RDF Schema

Parameters:
prop - the property which would be add
Returns:
if the Property was successfuly added

del

public boolean del(InstanceOfProperty prop)
Delete the instance of Property

Parameters:
prop - the instance property which would be deleted
Returns:
if the Property was successfuly deleted

getProperties

public InstanceOfProperty[] getProperties()
Get all properties members of the RDF Schema

Returns:
the properties

getProperty

public InstanceOfProperty getProperty(String name)
Get a property from his name

Parameters:
name - property name
Returns:
a property

getRdfs

public RdfsFile[] getRdfs()
Get the RDFSchema of the file

Returns:
RDF Schemas


A project by Blanc, Yoan – supervised by Dr. Ghorbel, Hatem.
2004 © Blanc, Yoan - HE-ARC