cdmlibrary/src/main/resources/terms/HybridRelationshipType.csv -text
cdmlibrary/src/main/resources/terms/NameRelationshipType.csv -text
cdmlibrary/src/main/resources/terms/NomenclaturalStatusType.csv -text
+cdmlibrary/src/main/resources/terms/README.TXT -text
cdmlibrary/src/main/resources/terms/Rank.csv -text
cdmlibrary/src/main/resources/terms/SynonymRelationshipType.csv -text
cdmlibrary/src/main/resources/terms/TypeDesignationStatus.csv -text
return contact;
}
protected void setContact(Contact newContact) {
+ // Hibernate bidirectional cascade hack:
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-1054
+ if(this.contact == newContact) return;
if (contact != null) {
contact.addresses.remove(this);
}
return person;
}
public void setPerson(Person newPerson) {
+ // Hibernate bidirectional cascade hack:
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-1054
+ if(this.person == newPerson) return;
if (person != null) {
person.institutionalMemberships.remove(this);
}
return annotatedObj;
}
protected void setAnnotatedObj(AnnotatableEntity newAnnotatedObj) {
+ // Hibernate bidirectional cascade hack:
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-1054
+ if(this.annotatedObj == newAnnotatedObj) return;
if (annotatedObj != null) {
annotatedObj.annotations.remove(this);
}
}
return false;
}
+
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName()+"#"+this.getUuid();
+ }
+
}
return this.vocabulary;
}
public void setVocabulary(TermVocabulary newVocabulary) {
+ // Hibernate bidirectional cascade hack:
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-1054
+ if(this.vocabulary == newVocabulary) return;
if (this.vocabulary != null) {
this.vocabulary.terms.remove(this);
}
return markedObj;
}
protected void setMarkedObj(AnnotatableEntity newMarkedObject) {
+ // Hibernate bidirectional cascade hack:
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-1054
+ if(this.markedObj == newMarkedObject) return;
if (markedObj != null) {
markedObj.markers.remove(this);
}
Set<Representation> inverseRepresentations) {
this.inverseRepresentations = inverseRepresentations;
}
- public void addRepresentation(Representation representation) {
- this.inverseRepresentations.add(representation);
+ public void addInverseRepresentation(Representation inverseRepresentation) {
+ this.inverseRepresentations.add(inverseRepresentation);
}
- public void removeRepresentation(Representation representation) {
- this.inverseRepresentations.remove(representation);
+ public void removeInverseRepresentation(Representation inverseRepresentation) {
+ this.inverseRepresentations.remove(inverseRepresentation);
+ }
+ public void addRepresentation(Representation representation, Representation inverseRepresentation) {
+ this.addRepresentation(representation);
+ this.addInverseRepresentation(inverseRepresentation);
}
@Transient
protected void setDescription(String text) {
super.setText(text);
}
-
+
+ public String toString(){
+ // we dont need the language returned too, do we?
+ return getLabel();
+// if(getLanguage()==null || getLanguage().getLabel()==null){
+// return getLabel();
+// }else{
+// return getLabel()+"("+ getLanguage().getLabel()+")";
+// }
+ }
}
\ No newline at end of file
@Transient
public Representation getRepresentation(Language lang) {
for (Representation repr : representations){
- if (repr.getLanguage() == lang){
+ if (repr.getLanguage().equals(lang)){
return repr;
}
}
this.uri = uri;
}
- public String toString() {
- String result="DT<"+uri+">:";
- for (Representation r : representations){
- result += r.getLabel()+"("+r.getLanguage().getTermLabel()+")";
- }
- return result;
- }
-
@Transient
- public String getTermLabel() {
- return this.getRepresentation(Language.DEFAULT()).getLabel();
+ public String getLabel() {
+ if(getLabel(Language.DEFAULT())!=null){
+ return this.getRepresentation(Language.DEFAULT()).getLabel();
+ }else{
+ for (Representation r : representations){
+ return r.getLabel();
+ }
+ }
+ return super.getUuid();
}
@Transient
- public String getTermLabel(Language lang) {
+ public String getLabel(Language lang) {
return this.getRepresentation(lang).getLabel();
}
@Transient
- public String getTermText() {
+ public String getDescription() {
return this.getRepresentation(Language.DEFAULT()).getLabel();
}
@Transient
- public String getTermText(Language lang) {
+ public String getDescription(Language lang) {
return this.getRepresentation(lang).getLabel();
}
return false;
}
+ @Override
+ public String toString() {
+ String result="DT<"+uri+">:";
+ for (Representation r : representations){
+ result += r.toString();
+ }
+ return result;
+ }
+
}
@Entity
public class NamedArea extends OrderedTermBase {
static Logger logger = Logger.getLogger(NamedArea.class);
- //description of this area
- private String description;
//description of time valid context of this area. e.g. year range
private TimePeriod validPeriod;
//Binary shape definition for user's defined area as polygon
this.level = level;
}
- public String getDescription(){
- return this.description;
- }
- public void setDescription(String description){
- this.description = description;
- }
-
public TimePeriod getValidPeriod(){
return this.validPeriod;
}
}
public void setTypifiedName(TaxonNameBase newTypifiedName) {
+ // Hibernate bidirectional cascade hack:
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-1054
+ if(this.typifiedName == newTypifiedName) return;
if (typifiedName != null) {
typifiedName.typeDesignations.remove(this);
}
term.setVocabulary(voc);
term.addRepresentation(new Representation(nextLine[1].trim(), nextLine[1].trim(), Language.DEFAULT()));
logger.debug("Created term: "+term.toString());
- //this.saveCdmObj(term);
}
} catch (IOException e) {
// TODO Auto-generated catch block
-UUID Term Inverseterm Symetric Transitive
Taxonomically Included in Taxonomically Includes *
Misapplied Name for Has Misapplied Name
Invalid Designation for Has Invalid Designation
-Uuid Term Inverseterm Symetric Transitive
First Parent Child
Second Parent Child
Female Parent Child
-Uuid Term Inverseterm Symetric Transitive
Orthographic Variant * *
Later Homonym Ealier Homonym *
Treated As Later Homonym Treated As Earlier Homonym
Replaced Synonym New Name
Conserved Against Rejected in Favour
Validated by Name Validating Name
- Later Validated by Name Later Validating Name
-
-Hybridrelationshiptype
- First Parent Child
- Second Parent Child
- Female Parent Child
- Male Parent Child
\ No newline at end of file
+ Later Validated by Name Later Validating Name
\ No newline at end of file
-Uuid Term
Ambiguous
Doubtful
Confusum
--- /dev/null
+The format for all term files is a simple CSV file, preferrably tab separated, with the following columns for each term (=row):
+UUID Term InverseTerm Symmetric Transitive
+
+For the boolean symmetric or transetive use any non whitespace character, e.g. *
\ No newline at end of file
-Uuid Term
Empire
Domain
Super Kingdom
-UUID Term
Synonym of
Pro Parte Synonym of
Partial Synonym of
-UUID Term
Holotype
Lectotype
Neotype