ch.hearc.I04_05s08.Ontology.RDFS
Class RdfsFile

java.lang.Object
  extended bych.hearc.I04_05s08.Ontology.OntFile
      extended bych.hearc.I04_05s08.Ontology.RDFS.RdfsFile

public class RdfsFile
extends OntFile

A representation of a rdfs:Class

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

Field Summary
private  LinkedList classes
          Classes composing the RDF Schema
private  LinkedList properties
          Properties composing the RDF Schema
 
Fields inherited from class ch.hearc.I04_05s08.Ontology.OntFile
 
Constructor Summary
RdfsFile()
          Init the untitled RDF Schema file
RdfsFile(String filename)
          Init the RDF Schema file
 
Method Summary
 boolean add(RdfsClass c)
          Add a new Class to the RDF Schema
 boolean add(RdfsProperty prop)
          Add a new Property to the RDF Schema
 boolean add(RdfsResource r)
          Add a resource to the file
 boolean containsClass(RdfsClass c)
          Return if the RdfsClass is already in the file
 boolean del(RdfsClass c)
          Remove a Class from the RDF Schema
 boolean del(RdfsProperty prop)
          Delete the Property
 boolean del(RdfsResource r)
          Delete a resource from the file
 RdfsClass getClass(String name)
          Get a class from is name
 RdfsClass[] getClasses()
          Get all classes members of the RDF Schema
 RdfsProperty[] getProperties()
          Get all properties members of the RDF Schema
 RdfsProperty getProperty(String name)
          Get a property from is name
 String toString()
          String representation of the rdfs 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
Classes composing the RDF Schema


properties

private LinkedList properties
Properties composing the RDF Schema

Constructor Detail

RdfsFile

public RdfsFile(String filename)
Init the RDF Schema file

Parameters:
filename - the file's path

RdfsFile

public RdfsFile()
Init the untitled RDF Schema file

Method Detail

toString

public String toString()
String representation of the rdfs file

Overrides:
toString in class OntFile
Returns:
each classes and properties

del

public boolean del(RdfsResource r)
Delete a resource from the file

Parameters:
r - resource
Returns:
if the resource isn't already out

add

public boolean add(RdfsResource r)
Add a resource to the file

Parameters:
r - resource
Returns:
if the resource isn't already in

add

public boolean add(RdfsClass c)
Add a new Class to the RDF Schema

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

del

public boolean del(RdfsClass 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 RdfsClass[] getClasses()
Get all classes members of the RDF Schema

Returns:
the classes

getClass

public RdfsClass getClass(String name)
Get a class from is name

Parameters:
name - the name of the desired class
Returns:
the class

containsClass

public boolean containsClass(RdfsClass c)
Return if the RdfsClass is already in the file

Returns:
if the rdfs is already in

add

public boolean add(RdfsProperty 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(RdfsProperty prop)
Delete the Property

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

getProperties

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

Returns:
the properties

getProperty

public RdfsProperty getProperty(String name)
Get a property from is name

Parameters:
name - the name of the desired property
Returns:
the property


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