ch.hearc.I04_05s08.Ontology
Class OntFile

java.lang.Object
  extended bych.hearc.I04_05s08.Ontology.OntFile
Direct Known Subclasses:
RdfFile, RdfsFile

public class OntFile
extends Object

An base class for any files in Ontology

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

Field Summary
private  File file
          The file
private  String filename
          The path of the file
private  FileInputStream inFile
          The file's input stream
 
Constructor Summary
OntFile()
          Construct an untitled file
OntFile(String filename)
          Construct the file
 
Method Summary
 void close()
          Close the file
 String getFilename()
          Return the path of the file
 String getName()
          File's name
 FileInputStream getReader()
          Return a reader for the file
private  boolean initReader()
          Build the file's reader
 void setFilename(String filename)
          Set the path of the file
 String toString()
          String representation of the file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filename

private String filename
The path of the file


inFile

private FileInputStream inFile
The file's input stream


file

private File file
The file

Constructor Detail

OntFile

public OntFile(String filename)
Construct the file

Parameters:
filename - the path of the file

OntFile

public OntFile()
Construct an untitled file

Method Detail

toString

public String toString()
String representation of the file

Returns:
file's name (given by the user)

getName

public String getName()
File's name

Returns:
the file's name (real)

getReader

public FileInputStream getReader()
Return a reader for the file

Returns:
a stream reader

close

public void close()
Close the file


setFilename

public void setFilename(String filename)
Set the path of the file

Parameters:
filename - the file's path

getFilename

public String getFilename()
Return the path of the file

Returns:
the file's path

initReader

private boolean initReader()
Build the file's reader

Returns:
the operation's success


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