org.qsos.utils
Class LibQSOS

java.lang.Object
  extended by org.qsos.utils.LibQSOS
All Implemented Interfaces:
ILibQSOS

public class LibQSOS
extends java.lang.Object
implements ILibQSOS

This class implements the methodes to be used in a QSOS Editor in Java. It uses a search class so if the xml format is modified, a very few modifications would have to be done. It implements the interface ILibQSOS.

Author:
Arthur Clerfeuille

Constructor Summary
LibQSOS()
          Constructor for the class LibQSOS.
LibQSOS(ISheet sheet)
          Constructor for the class LibQSOS which sets the sheet.
 
Method Summary
 void addAuthor(java.lang.String nameString, java.lang.String emailString)
          Allows to add an author to the list of authors.
 java.lang.String Debugaffichage(java.util.List<SimpleMenuEntry> list)
          Fonction de debuggage
 void delAuthor(java.lang.String name)
          Allows to delete an author.
 java.lang.String getAppname()
          Allows to get the application name.
 java.lang.String getAuthors()
          Allows to get the name of all the authors.
 java.lang.String getCommentByName(java.lang.String name)
          Allows to get the comment on an element.
 java.lang.String getDemoUrl()
          Allows to get the demonstration url.
 java.lang.String getDesc()
          Allows to get the description.
 java.lang.String getDescByName(java.lang.String name, int numDesc)
          Allows to get the description number numDesc of the element called name.
 java.lang.String getLanguage()
          Allows to get the language.
 java.lang.String getLicenseDesc()
          Allows to get the license Description.
 java.lang.String getLicenseId()
          Allows to get the license Id.
 java.lang.String getLicenselist()
          Not implemented yet
 java.lang.String getQsosappfamily()
          Allows to get the application family in QSOS.
 java.lang.String getQsosformat()
          Allows to get the QSOS format.
 java.lang.String getQsosspecificformat()
          Allows to get the QSOS specific format.
 java.lang.String getRelease()
          Allows to get the release number.
 java.lang.String getScoreByName(java.lang.String name)
          Allows to get the score of an element.
 ISheet getSheet()
           
 java.util.List<SimpleMenuEntry> getSimpleTree()
           
 java.lang.String getUrl()
          Allows to get the url.
 void load(java.net.URL url)
          Allows to load the java model corresponding to the xml document found at the url.
 void setAppname(java.lang.String appname)
          Allows to set the application name.
 void setCommentByName(java.lang.String name, java.lang.String comment)
          Allows to set a comment to an element given by his name.
 void setDemoUrl(java.lang.String demourl)
          Allows to set the demonstration url.
 void setDesc(java.lang.String desc)
          Allows to set the description.
 void setLanguage(java.lang.String language)
          Allows to set the language.
 void setLicenseDesc(java.lang.String licensedesc)
          Allows to set the license Description.
 void setLicenseId(java.lang.String licenseId)
          Allows to set the license Id.
 void setQsosappfamily(java.lang.String qsosappfamily)
          Allows to set the application family in QSOS.
 void setQsosformat(java.lang.String qsosformat)
          Allows to set the QSOS format.
 void setQsosspecificformat(java.lang.String qsosspecificformat)
          Allows to set the QSOS specific format.
 void setRelease(java.lang.String release)
          Allows to set the release.
 void setScoreByName(java.lang.String name, java.lang.String score)
          Allows to set the score of an element
 void setSheet(ISheet sheet)
           
 void setUrl(java.lang.String url)
          Allows to set the url.
 void write(java.lang.String path)
          Allows to write the xml file at the given path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibQSOS

public LibQSOS()
Constructor for the class LibQSOS.


LibQSOS

public LibQSOS(ISheet sheet)
Constructor for the class LibQSOS which sets the sheet.

Method Detail

load

public void load(java.net.URL url)
Allows to load the java model corresponding to the xml document found at the url.

Specified by:
load in interface ILibQSOS
Parameters:
url - the URL where the xml document is get.

getSheet

public ISheet getSheet()
Specified by:
getSheet in interface ILibQSOS

setSheet

public void setSheet(ISheet sheet)
Specified by:
setSheet in interface ILibQSOS

getSimpleTree

public java.util.List<SimpleMenuEntry> getSimpleTree()
Specified by:
getSimpleTree in interface ILibQSOS

Debugaffichage

public java.lang.String Debugaffichage(java.util.List<SimpleMenuEntry> list)
Fonction de debuggage

Specified by:
Debugaffichage in interface ILibQSOS
Returns:

getDescByName

public java.lang.String getDescByName(java.lang.String name,
                                      int numDesc)
Allows to get the description number numDesc of the element called name.

Specified by:
getDescByName in interface ILibQSOS
Parameters:
name - the name to search.
numDesc - int representing the number of the description to search.
Returns:
a String corresponding to the description asked.

setCommentByName

public void setCommentByName(java.lang.String name,
                             java.lang.String comment)
Allows to set a comment to an element given by his name.

Specified by:
setCommentByName in interface ILibQSOS
Parameters:
name - the name of the element.
comment - the comment to set.

getCommentByName

public java.lang.String getCommentByName(java.lang.String name)
Allows to get the comment on an element.

Specified by:
getCommentByName in interface ILibQSOS
Parameters:
name - the name of the element to get.
Returns:
a String corresponding to the comment of the element asked.

getScoreByName

public java.lang.String getScoreByName(java.lang.String name)
Allows to get the score of an element.

Specified by:
getScoreByName in interface ILibQSOS
Parameters:
name - the name of the element.
Returns:
a String representing the score of the Element.

setScoreByName

public void setScoreByName(java.lang.String name,
                           java.lang.String score)
Allows to set the score of an element

Specified by:
setScoreByName in interface ILibQSOS
Parameters:
name - the name of the element.
score - a String representing the score to set.

getAuthors

public java.lang.String getAuthors()
Allows to get the name of all the authors.

Specified by:
getAuthors in interface ILibQSOS
Returns:
a String that contains the names of all the authors.

addAuthor

public void addAuthor(java.lang.String nameString,
                      java.lang.String emailString)
Allows to add an author to the list of authors.

Specified by:
addAuthor in interface ILibQSOS
Parameters:
nameString - the name of the author to add.
emailString - the email of the author to add.

delAuthor

public void delAuthor(java.lang.String name)
Allows to delete an author.

Specified by:
delAuthor in interface ILibQSOS
Parameters:
name - the name of the author to delete.

getAppname

public java.lang.String getAppname()
Allows to get the application name.

Specified by:
getAppname in interface ILibQSOS
Returns:
a string corresponding to the application name.

setAppname

public void setAppname(java.lang.String appname)
Allows to set the application name.

Specified by:
setAppname in interface ILibQSOS
Parameters:
appname - the application name to set.

getLanguage

public java.lang.String getLanguage()
Allows to get the language.

Specified by:
getLanguage in interface ILibQSOS
Returns:
a string corresponding to the language.

setLanguage

public void setLanguage(java.lang.String language)
Allows to set the language.

Specified by:
setLanguage in interface ILibQSOS
Parameters:
language - the language to set.

getRelease

public java.lang.String getRelease()
Allows to get the release number.

Specified by:
getRelease in interface ILibQSOS
Returns:
a string corresponding to the release number.

setRelease

public void setRelease(java.lang.String release)
Allows to set the release.

Specified by:
setRelease in interface ILibQSOS
Parameters:
release - the release to set.

getLicenselist

public java.lang.String getLicenselist()
Not implemented yet

Specified by:
getLicenselist in interface ILibQSOS

getLicenseId

public java.lang.String getLicenseId()
Allows to get the license Id.

Specified by:
getLicenseId in interface ILibQSOS
Returns:
a string corresponding to the License Id.

setLicenseId

public void setLicenseId(java.lang.String licenseId)
Allows to set the license Id.

Specified by:
setLicenseId in interface ILibQSOS
Parameters:
licenseId - the license Id to set.

getLicenseDesc

public java.lang.String getLicenseDesc()
Allows to get the license Description.

Specified by:
getLicenseDesc in interface ILibQSOS
Returns:
a string corresponding to the license Description.

setLicenseDesc

public void setLicenseDesc(java.lang.String licensedesc)
Allows to set the license Description.

Specified by:
setLicenseDesc in interface ILibQSOS
Parameters:
licensedesc - the license Description to set.

getUrl

public java.lang.String getUrl()
Allows to get the url.

Specified by:
getUrl in interface ILibQSOS
Returns:
a string corresponding to the url.

setUrl

public void setUrl(java.lang.String url)
Allows to set the url.

Specified by:
setUrl in interface ILibQSOS
Parameters:
url - the url to set.

getDesc

public java.lang.String getDesc()
Allows to get the description.

Specified by:
getDesc in interface ILibQSOS
Returns:
a string corresponding to the description.

setDesc

public void setDesc(java.lang.String desc)
Allows to set the description.

Specified by:
setDesc in interface ILibQSOS
Parameters:
desc - the description to set.

getDemoUrl

public java.lang.String getDemoUrl()
Allows to get the demonstration url.

Specified by:
getDemoUrl in interface ILibQSOS
Returns:
a string corresponding to the demonstration url.

setDemoUrl

public void setDemoUrl(java.lang.String demourl)
Allows to set the demonstration url.

Specified by:
setDemoUrl in interface ILibQSOS
Parameters:
demourl - the demonstration url to set.

getQsosformat

public java.lang.String getQsosformat()
Allows to get the QSOS format.

Specified by:
getQsosformat in interface ILibQSOS
Returns:
a string corresponding to the QSOS format.

setQsosformat

public void setQsosformat(java.lang.String qsosformat)
Allows to set the QSOS format.

Specified by:
setQsosformat in interface ILibQSOS
Parameters:
qsosformat - the QSOS format to set.

getQsosspecificformat

public java.lang.String getQsosspecificformat()
Allows to get the QSOS specific format.

Specified by:
getQsosspecificformat in interface ILibQSOS
Returns:
a string corresponding to the QSOS specific format.

setQsosspecificformat

public void setQsosspecificformat(java.lang.String qsosspecificformat)
Allows to set the QSOS specific format.

Specified by:
setQsosspecificformat in interface ILibQSOS
Parameters:
qsosspecificformat - the QSOS specific format to set.

getQsosappfamily

public java.lang.String getQsosappfamily()
Allows to get the application family in QSOS.

Specified by:
getQsosappfamily in interface ILibQSOS
Returns:
a string corresponding to the application family in QSOS.

setQsosappfamily

public void setQsosappfamily(java.lang.String qsosappfamily)
Allows to set the application family in QSOS.

Specified by:
setQsosappfamily in interface ILibQSOS
Parameters:
qsosappfamily - the application family in QSOS to set.

write

public void write(java.lang.String path)
Allows to write the xml file at the given path. This method has a problem since it degrated the xml file ( not the datas but the presentation). It will be fixed in the next version

Specified by:
write in interface ILibQSOS
Parameters:
path -