macaw.businessLayer
Class OntologyTerm

java.lang.Object
  extended by macaw.businessLayer.OntologyTerm
All Implemented Interfaces:
java.lang.Cloneable, Displayable

public class OntologyTerm
extends java.lang.Object
implements Displayable, java.lang.Cloneable


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
OntologyTerm()
           
 
Method Summary
 java.lang.Object clone()
           
static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user, OntologyTerm originalOntologyTerm, OntologyTerm revisedOntologyTerm)
           
 java.lang.String getDescription()
          the meaning of the phrase eg: “a person’s gender”
 java.lang.String getDisplayItemIdentifier()
           
 java.lang.String getDisplayName()
           
 int getIdentifier()
          a unique numeric identifier that is used by software clients to manage the term eg: 10453.
 java.lang.String getNameSpace()
          a URI fragment that is used to uniquely identify ontology concepts for software clients eg: www.nshd.mrc.ac.uk:LHA/variables
 java.lang.String getOntologyName()
          the name of an ontology to which this term belongs.
 java.lang.String getTerm()
          a phrase that represents a concept to the user eg: “sex”
 boolean hasSameDisplayName(OntologyTerm ontologyTerm)
           
 boolean isNewRecord()
           
 void setDescription(java.lang.String description)
           
 void setIdentifier(int identifier)
           
 void setNameSpace(java.lang.String nameSpace)
           
 void setNewRecord(boolean isNewRecord)
           
 void setOntologyName(java.lang.String ontologyName)
           
 void setTerm(java.lang.String term)
           
static void validateFields(OntologyTerm ontologyTerm)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntologyTerm

public OntologyTerm()
Method Detail

getIdentifier

public int getIdentifier()
a unique numeric identifier that is used by software clients to manage the term eg: 10453.

Returns:
the identifier

setIdentifier

public void setIdentifier(int identifier)
Parameters:
identifier - the identifier to set

getTerm

public java.lang.String getTerm()
a phrase that represents a concept to the user eg: “sex”

Returns:
the term

setTerm

public void setTerm(java.lang.String term)
Parameters:
term - the term to set

getOntologyName

public java.lang.String getOntologyName()
the name of an ontology to which this term belongs. eg: “The LHA dictionary”

Returns:
the ontologyName

setOntologyName

public void setOntologyName(java.lang.String ontologyName)
Parameters:
ontologyName - the ontologyName to set

getDescription

public java.lang.String getDescription()
the meaning of the phrase eg: “a person’s gender”

Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

getNameSpace

public java.lang.String getNameSpace()
a URI fragment that is used to uniquely identify ontology concepts for software clients eg: www.nshd.mrc.ac.uk:LHA/variables

Returns:
the nameSpace

setNameSpace

public void setNameSpace(java.lang.String nameSpace)
Parameters:
nameSpace - the nameSpace to set

isNewRecord

public boolean isNewRecord()
Returns:
the isNewRecord

setNewRecord

public void setNewRecord(boolean isNewRecord)
Parameters:
isNewRecord - the isNewRecord to set

hasSameDisplayName

public boolean hasSameDisplayName(OntologyTerm ontologyTerm)

validateFields

public static void validateFields(OntologyTerm ontologyTerm)
                           throws MacawException
Throws:
MacawException

detectFieldChanges

public static java.util.ArrayList<MacawChangeEvent> detectFieldChanges(User user,
                                                                       OntologyTerm originalOntologyTerm,
                                                                       OntologyTerm revisedOntologyTerm)

getDisplayName

public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface Displayable

getDisplayItemIdentifier

public java.lang.String getDisplayItemIdentifier()
Specified by:
getDisplayItemIdentifier in interface Displayable

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object