public class

ConceptImpl

extends Object
implements Serializable JPAEntity Concept
java.lang.Object
   ↳ vars.knowledgebase.jpa.ConceptImpl

Summary

[Expand]
Inherited Constants
From interface vars.knowledgebase.Concept
Public Constructors
ConceptImpl()
Public Methods
void addChildConcept(Concept child)
Adds a child Concept object to this Concept.
void addConceptName(ConceptName conceptName)
Associates a ConceptName to this Concept.
boolean equals(Object obj)
List<Concept> getChildConcepts()
Returns an array of the Concept objects identified as immediately below this Concept in the KnowledgeBase hierarchy.
ConceptMetadata getConceptMetadata()

This method should not be called directly by an application developer.

ConceptName getConceptName(String name)
Gets the ConceptName object of the specified String name.
Set<ConceptName> getConceptNames()
This method returns a defensive copy.
Long getId()
String getNodcCode()
Gets the nodcCode attribute of the Concept object
String getOriginator()
Gets the String name of the originator of the placement of this Concept in the Knowledge Base heirarchy.
Concept getParentConcept()
Gets the parentConcept Concept of this Concept.
ConceptName getPrimaryConceptName()
Gets the unique ConceptName object which represents the primary name of this Concept.
Object getPrimaryKey()
String getRankLevel()
Gets the rankLevel attribute of the Concept object
String getRankName()
Gets the rankName attribute of the Concept object
String getReference()
Gets the reference attribute of the Concept object
Concept getRootConcept()
Returns the root concept of this branch of concepts
String getStructureType()
Gets the structure type of this Concept.
String getTaxonomyType()
boolean hasChildConcepts()
WARNING! Due to lazy loading you will need to explicitly load the childconcepts in a JPA transaction first.
boolean hasDescendent(String child)
WARNING! Due to lazy loading you will need to explicitly load the childconcepts in a JPA transaction first.
boolean hasDetails()
Returns boolean whether this Concept has details associated with it (it is more than just a ConceptName).
boolean hasParent()
Indicates whether this Concept has a parentConcept Concept in the hierarchy of the KnowledgeBase.
int hashCode()
void loadLazyRelations()
This needs to be called inside of a JPA transaction in order to do anything
void removeChildConcept(Concept childConcept)
Removes a child Concept from this Concept .
void removeConceptName(ConceptName conceptName)
Removes the specified ConceptName from this Concept .
void setId(Long id)
void setNodcCode(String nodcCode)
Sets the nodcCode attribute of the Concept object
void setOriginator(String originator)
Sets the originator attribute of the Concept object
void setRankLevel(String rankLevel)
Sets the rankLevel attribute of the Concept object
void setRankName(String rankName)
Sets the rankName attribute of the Concept object
void setReference(String reference)
Sets the reference attribute of the Concept object
void setStructureType(String structureType)
Sets the structureType attribute of the Concept object.
void setTaxonomyType(String taxonomyType)
String toString()
Protected Methods
void setConceptMetadata(ConceptMetadata conceptMetadata)
This method shouldn't be called by developers.
[Expand]
Inherited Methods
From class java.lang.Object
From interface vars.ILazy
From interface vars.VARSObject
From interface vars.jpa.JPAEntity
From interface vars.knowledgebase.Concept

Public Constructors

public ConceptImpl ()

Public Methods

public void addChildConcept (Concept child)

Adds a child Concept object to this Concept.

Parameters
child A Concept object identified as a child of this Concept in the KnowledgeBase hierarchy.

public void addConceptName (ConceptName conceptName)

Associates a ConceptName to this Concept. If a ConceptName is primary and it's added to a concept that already has a primary conceptName, then the existing primary name is changed to type NAMETYPE_SYNONYM while the new one becomes the primary name.

Parameters
conceptName A ConceptName to associate with this Concept.
Returns
  • Description of the Return Value

public boolean equals (Object obj)

public List<Concept> getChildConcepts ()

Returns an array of the Concept objects identified as immediately below this Concept in the KnowledgeBase hierarchy.

Returns
  • An array of the children Concept objects of this Concept.

public ConceptMetadata getConceptMetadata ()

This method should not be called directly by an application developer.

In order to speed up database transactions most of the anxillary classes are now associated with a delegate rather than directly to a Concept. This delegate is lazy loaded using IDAO objects because castor does not support lazy loading. This should speed up transactions greatly.

Returns
  • The conceptDelegate which matintains associations to anxillary information classes.

public ConceptName getConceptName (String name)

Gets the ConceptName object of the specified String name. Returns null if this Concept has no such associated ConceptName.

Parameters
name Description of the Parameter
Returns
  • The ConceptName object of the specified String name; null if this Concept has no such ConceptName.

public Set<ConceptName> getConceptNames ()

This method returns a defensive copy. Adds or removes will have no affect on the database. However, modifications to the objects can be persisted.

Returns
  • The collection of ConceptNames associated with this Concept. This a syncrhonized collection so you will need to synchronize on it before iterating.

public Long getId ()

public String getNodcCode ()

Gets the nodcCode attribute of the Concept object

Returns
  • The nodcCode value

public String getOriginator ()

Gets the String name of the originator of the placement of this Concept in the Knowledge Base heirarchy. (i.e The name of the person who entered this concept into the Knowledge Base)

Returns
  • The String name of the originator of the placement of this Concept in the Knowledge Base heirarchy.

public Concept getParentConcept ()

Gets the parentConcept Concept of this Concept. Concept objects at the root of the KnowledgeBase hierarchy do not have a parentConcept Concept.

Returns
  • The parentConcept Concept of this Concept. null if no parent is found.

public ConceptName getPrimaryConceptName ()

Gets the unique ConceptName object which represents the primary name of this Concept.

Returns
  • The unique ConceptName object which represents the primary name of this Concept.

public Object getPrimaryKey ()

public String getRankLevel ()

Gets the rankLevel attribute of the Concept object

Returns
  • The rankLevel value

public String getRankName ()

Gets the rankName attribute of the Concept object

Returns
  • The rankName value

public String getReference ()

Gets the reference attribute of the Concept object

Returns
  • The reference value

public Concept getRootConcept ()

Returns the root concept of this branch of concepts

Returns
  • The root concept

public String getStructureType ()

Gets the structure type of this Concept.

Returns
  • The structure type of this Concept.

public String getTaxonomyType ()

public boolean hasChildConcepts ()

WARNING! Due to lazy loading you will need to explicitly load the childconcepts in a JPA transaction first.

Returns
  • A boolean whether this Concept has any children.

public boolean hasDescendent (String child)

WARNING! Due to lazy loading you will need to explicitly load the childconcepts in a JPA transaction first.

Parameters
child The String name to search for. This is compared against all ConceptNames that this concept and its descendents contain.
Returns
  • true if this concept or one of its descendents has a ConceptName that matches the argument.

public boolean hasDetails ()

Returns boolean whether this Concept has details associated with it (it is more than just a ConceptName).

Returns
  • A boolean whether this Concept has associated details.

public boolean hasParent ()

Indicates whether this Concept has a parentConcept Concept in the hierarchy of the KnowledgeBase.

Returns
  • true if this Concept has a parentConcept Concept in the hierarchy of the KnowledgeBase;false otherwise.

public int hashCode ()

public void loadLazyRelations ()

This needs to be called inside of a JPA transaction in order to do anything

public void removeChildConcept (Concept childConcept)

Removes a child Concept from this Concept .

Parameters
childConcept A Concept to remove from this Concept .
Returns
  • true if the child Concept is removed.

public void removeConceptName (ConceptName conceptName)

Removes the specified ConceptName from this Concept .

Parameters
conceptName The ConceptName to remove from this Concept .
Returns
  • true if successfully removed.

public void setId (Long id)

public void setNodcCode (String nodcCode)

Sets the nodcCode attribute of the Concept object

Parameters
nodcCode The new nodcCode value

public void setOriginator (String originator)

Sets the originator attribute of the Concept object

Parameters
originator The new originator value

public void setRankLevel (String rankLevel)

Sets the rankLevel attribute of the Concept object

Parameters
rankLevel The new rankLevel value

public void setRankName (String rankName)

Sets the rankName attribute of the Concept object

Parameters
rankName The new rankName value

public void setReference (String reference)

Sets the reference attribute of the Concept object

Parameters
reference The new reference value

public void setStructureType (String structureType)

Sets the structureType attribute of the Concept object. Valid values are Concept.TAXONOMY, Concept>LITHOLOGY

Parameters
structureType The new structureType value

public void setTaxonomyType (String taxonomyType)

public String toString ()

Protected Methods

protected void setConceptMetadata (ConceptMetadata conceptMetadata)

This method shouldn't be called by developers. It's added to support the cascadeDelete method in the ConceptDAO