project35.configurationTool
Class Project35ConfigurationOntologySource

java.lang.Object
  extended by project35.configurationTool.Project35ConfigurationOntologySource
All Implemented Interfaces:
java.io.Serializable, OntologySource, ServiceClass

public class Project35ConfigurationOntologySource
extends java.lang.Object
implements OntologySource

used in the Project35 configuration tool to supply names of records and fields. Note that this is not meant for general use and fulfills a specific project35 configuration purpose

This source expects the calling field to be called "name", but it looks at the name of the calling record to figure out whether "name" should be supplied with the list of record types or record fields in the schema. by default, if the record type of the calling record is "record" it returns the names of all record types. if the record type is "record_field", it looks in the "record" parent of the "record_field" and finds out the record type. It uses this to return a collection of fields for that record type.

Developers can configure the ontology source to associate other names with these actions. in Project36, if the "name" field is in the context of a "query" or "query_result" record type, then it expects the names of all record types in the schema. "query_field" and "query_result_field" would warrant returning the field names for the appropriate record type. return_record_names - registers the parameter value as the name of a record type in that eg: "query", "query_result" return_all_field_names return_edit_field_names return_editable_field_names return_list_field_names


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
Project35ConfigurationOntologySource()
           
 
Method Summary
 boolean containsTerm(Project35FormContext project35FormContext, OntologyTerm ontologyTerm)
          determine whether the source contains a particular ontology term
static OntologyTerm[] gatherRecordClassNames(RecordModelFactory recordModelFactory)
           
 Parameter[] getInitialisationParameters()
           
 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[] initialisationParameters)
           
 boolean isWorking()
          indicates whether the ontology source is ready for service
 void setOntologyContext(OntologyContext ontologyContext)
           
 void setTargetSchemaRecordModelFactory(RecordModelFactory targetSchemaRecordModelFactory)
           
 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

Project35ConfigurationOntologySource

public Project35ConfigurationOntologySource()
Method Detail

getOntologyServiceMetaData

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

setTargetSchemaRecordModelFactory

public void setTargetSchemaRecordModelFactory(RecordModelFactory targetSchemaRecordModelFactory)

setOntologyContext

public void setOntologyContext(OntologyContext ontologyContext)

getInitialisationParameters

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

initialiseService

public void initialiseService(java.net.URL resourceDirectory,
                              Parameter[] initialisationParameters)
Specified by:
initialiseService in interface ServiceClass

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

gatherRecordClassNames

public static OntologyTerm[] gatherRecordClassNames(RecordModelFactory recordModelFactory)

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