project35.soa.ontology.sources
Class SingleColumnTextSource

java.lang.Object
  extended by project35.soa.ontology.sources.SingleColumnTextSource
All Implemented Interfaces:
java.io.Serializable, OntologySource, ServiceClass

public class SingleColumnTextSource
extends java.lang.Object
implements OntologySource

an ontology source that reads terms from a text file that contains a single column of ontology terms. This is probably the simplest example of implementing the OntologySource interface.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)
See Also:
Serialized Form

Constructor Summary
SingleColumnTextSource()
           
 
Method Summary
 boolean containsTerm(Project35FormContext project35FormContext, OntologyTerm ontologyTerm)
          determine whether the source contains a particular ontology term
 Parameter[] getInitialisationParameters()
           
 OntologyServiceMetaData getOntologyServiceMetaData()
           
 OntologyServiceMetaData getOntologyServiceMetaData(Project35FormContext project35FormContext)
           
 OntologyTermProvenance getOntologyTermProvenance(Project35FormContext project35FormContext, OntologyTerm ontologyTerm)
           
 OntologyTerm[] getRelatedTerms(Project35FormContext project35FormContext, OntologyRelationshipType relationshipType, OntologyTerm ontologyTerm)
           
 OntologySource getSubOntologySource(Project35FormContext project35FormContext, Parameter[] parameterList)
          returns another ontology source is basically this one but pared down by the parameters
 OntologyRelationshipType[] getSupportedOntologyRelationships(Project35FormContext project35FormContext)
           
 OntologyTerm[] getTerms(Project35FormContext project35FormContext)
          returns a collection of terms
 void initialiseService(java.net.URL resourceDirectory, Parameter[] parameters)
           
 boolean isWorking()
          indicates whether the ontology source is ready for service
 void setRemoteSource(boolean isRemoteSource)
           
 void setResourceDirectory(java.net.URL resourceDirectory)
           
 java.lang.String test()
          diagnostic method that indicates whether the ontology source is working.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleColumnTextSource

public SingleColumnTextSource()
Method Detail

getOntologyServiceMetaData

public OntologyServiceMetaData getOntologyServiceMetaData()

setRemoteSource

public void setRemoteSource(boolean isRemoteSource)

setResourceDirectory

public void setResourceDirectory(java.net.URL resourceDirectory)

getInitialisationParameters

public Parameter[] getInitialisationParameters()
Specified by:
getInitialisationParameters in interface ServiceClass

initialiseService

public void initialiseService(java.net.URL resourceDirectory,
                              Parameter[] parameters)
                       throws java.lang.Exception
Specified by:
initialiseService in interface ServiceClass
Throws:
java.lang.Exception

getOntologyServiceMetaData

public OntologyServiceMetaData getOntologyServiceMetaData(Project35FormContext project35FormContext)
Specified by:
getOntologyServiceMetaData in interface OntologySource

getOntologyTermProvenance

public OntologyTermProvenance getOntologyTermProvenance(Project35FormContext project35FormContext,
                                                        OntologyTerm ontologyTerm)
Specified by:
getOntologyTermProvenance in interface OntologySource

isWorking

public boolean isWorking()
Description copied from interface: OntologySource
indicates whether the ontology source is ready for service

Specified by:
isWorking in interface OntologySource

test

public java.lang.String test()
Description copied from interface: OntologySource
diagnostic method that indicates whether the ontology source is working.

Specified by:
test in interface OntologySource

getTerms

public OntologyTerm[] getTerms(Project35FormContext project35FormContext)
Description copied from interface: OntologySource
returns a collection of terms

Specified by:
getTerms in interface OntologySource

getSupportedOntologyRelationships

public OntologyRelationshipType[] getSupportedOntologyRelationships(Project35FormContext project35FormContext)
Specified by:
getSupportedOntologyRelationships in interface OntologySource

getRelatedTerms

public OntologyTerm[] getRelatedTerms(Project35FormContext project35FormContext,
                                      OntologyRelationshipType relationshipType,
                                      OntologyTerm ontologyTerm)
Specified by:
getRelatedTerms in interface OntologySource

containsTerm

public boolean containsTerm(Project35FormContext project35FormContext,
                            OntologyTerm ontologyTerm)
Description copied from interface: OntologySource
determine whether the source contains a particular ontology term

Specified by:
containsTerm in interface OntologySource

getSubOntologySource

public OntologySource getSubOntologySource(Project35FormContext project35FormContext,
                                           Parameter[] parameterList)
Description copied from interface: OntologySource
returns another ontology source is basically this one but pared down by the parameters

Specified by:
getSubOntologySource in interface OntologySource