project35.soa.ontology.sources
Class OntologyContext
java.lang.Object
project35.soa.ontology.sources.OntologyContext
public class OntologyContext
- extends java.lang.Object
holds information about what fields are on the current form. From the moment
a new form is displayed, OntologyContext keeps track of what ontology terms
have been used and stores meta data about them with
project35.soa.ontology.provenance.OntologyTermProvenanceManager
OntologyContext is used by Ontology services that want to use information
about the current data set to determine how to return the most relevant
collection of appropriate terms. It is used in Project35 as well as parts of
the Pierre project, in several types of deployment:
- a standalone GUI application
- a web application
- a text-based menu-driven application
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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OntologyContext
public OntologyContext(OntologyTermProvenanceManager ontologyTermProvenanceManager)
getOntologyTermProvenanceManager
public OntologyTermProvenanceManager getOntologyTermProvenanceManager()
getCurrentRecordClassName
public java.lang.String getCurrentRecordClassName()
getRecordModel
public RecordModel getRecordModel()
getCallingFieldName
public java.lang.String getCallingFieldName()
clearField
public void clearField(java.lang.String fieldName)
getFieldValue
public java.lang.String getFieldValue(java.lang.String fieldName)
getOntologyTextField
public javax.swing.text.JTextComponent getOntologyTextField(java.lang.String fieldName)
getFieldTerms
public OntologyTermProvenance[] getFieldTerms(java.lang.String fieldName)
getTerms
public java.util.ArrayList getTerms()
getLocale
public java.util.Locale getLocale()
setCurrentRecordClassName
public void setCurrentRecordClassName(java.lang.String currentRecordType)
setRecordModel
public void setRecordModel(RecordModel recordModel)
reset
public void reset()
clearTerms
public void clearTerms()
addField
public void addField(java.lang.String fieldName,
java.lang.Object valueSupplier)
removeField
public void removeField(java.lang.String fieldName)
addTerm
public void addTerm(java.lang.String fieldName,
OntologyTermProvenance ontologyTermProvenance)
addTerms
public void addTerms(java.lang.String fieldName,
java.util.ArrayList ontologyTerms)
setCallingField
public void setCallingField(java.lang.String callingFieldName)
getOntologyContextField
protected OntologyContextField getOntologyContextField(java.lang.String fieldName)
- returns the first instance of field name found