763 |
763 |
// ****************** Gathering Event *********************************/
|
764 |
764 |
|
765 |
765 |
//country
|
|
766 |
@Transient
|
766 |
767 |
public NamedArea getCountry(){
|
767 |
768 |
return (hasGatheringEvent() ? getGatheringEvent(true).getCountry() : null);
|
768 |
769 |
}
|
... | ... | |
781 |
782 |
getGatheringEvent(true).addCollectingArea(area);
|
782 |
783 |
}
|
783 |
784 |
}
|
|
785 |
@Transient
|
784 |
786 |
public Set<NamedArea> getCollectingAreas() {
|
785 |
787 |
return (hasGatheringEvent() ? getGatheringEvent(true).getCollectingAreas() : null);
|
786 |
788 |
}
|
... | ... | |
896 |
898 |
}
|
897 |
899 |
|
898 |
900 |
//collector
|
|
901 |
@Transient
|
899 |
902 |
public AgentBase getCollector() {
|
900 |
903 |
return (hasGatheringEvent() ? getGatheringEvent(true).getCollector() : null);
|
901 |
904 |
}
|
... | ... | |
904 |
907 |
}
|
905 |
908 |
|
906 |
909 |
//collecting method
|
|
910 |
@Transient
|
907 |
911 |
public String getCollectingMethod() {
|
908 |
912 |
return (hasGatheringEvent() ? getGatheringEvent(true).getCollectingMethod() : null);
|
909 |
913 |
}
|
... | ... | |
930 |
934 |
}
|
931 |
935 |
|
932 |
936 |
//exact location
|
|
937 |
@Transient
|
933 |
938 |
public Point getExactLocation() {
|
934 |
939 |
return (hasGatheringEvent() ? getGatheringEvent(true).getExactLocation() : null );
|
935 |
940 |
}
|
... | ... | |
955 |
960 |
}
|
956 |
961 |
|
957 |
962 |
//gathering event description
|
|
963 |
@Transient
|
958 |
964 |
public String getGatheringEventDescription() {
|
959 |
965 |
return (hasGatheringEvent() ? getGatheringEvent(true).getDescription() : null);
|
960 |
966 |
}
|
... | ... | |
963 |
969 |
}
|
964 |
970 |
|
965 |
971 |
//gatering period
|
|
972 |
@Transient
|
966 |
973 |
public TimePeriod getGatheringPeriod() {
|
967 |
974 |
return (hasGatheringEvent() ? getGatheringEvent(true).getTimeperiod() : null);
|
968 |
975 |
}
|
... | ... | |
971 |
978 |
}
|
972 |
979 |
|
973 |
980 |
//locality
|
|
981 |
@Transient
|
974 |
982 |
public LanguageString getLocality(){
|
975 |
983 |
return (hasGatheringEvent() ? getGatheringEvent(true).getLocality() : null);
|
976 |
984 |
}
|
... | ... | |
1068 |
1076 |
// LanguageString languageString = getEcologyAll().getPreferredLanguageString(languages);
|
1069 |
1077 |
// return languageString.getText();
|
1070 |
1078 |
// }
|
|
1079 |
@Transient
|
1071 |
1080 |
public Map<Language, LanguageString> getEcologyAll(){
|
1072 |
1081 |
if (ecology == null){
|
1073 |
1082 |
try {
|
... | ... | |
1132 |
1141 |
// LanguageString languageString = getPlantDescriptionAll().getPreferredLanguageString(languages);
|
1133 |
1142 |
// return languageString.getText();
|
1134 |
1143 |
// }
|
|
1144 |
@Transient
|
1135 |
1145 |
public Map<Language, LanguageString> getPlantDescriptionAll(){
|
1136 |
1146 |
if (plantDescription == null){
|
1137 |
1147 |
try {
|
... | ... | |
1173 |
1183 |
public void addFieldObjectDefinition(String text, Language language) {
|
1174 |
1184 |
getFieldObservation(true).addDefinition(text, language);
|
1175 |
1185 |
}
|
1176 |
|
|
|
1186 |
@Transient
|
1177 |
1187 |
public Map<Language, LanguageString> getFieldObjectDefinition() {
|
1178 |
1188 |
if (! hasFieldObservation()){
|
1179 |
1189 |
return new HashMap<Language, LanguageString>();
|
... | ... | |
1239 |
1249 |
* Returns the media for the field object.<BR>
|
1240 |
1250 |
* @return
|
1241 |
1251 |
*/
|
|
1252 |
@Transient
|
1242 |
1253 |
public List<Media> getFieldObjectMedia() {
|
1243 |
1254 |
try {
|
1244 |
1255 |
List<Media> result = getMedia(getFieldObservation(false), false);
|
... | ... | |
1256 |
1267 |
}
|
1257 |
1268 |
|
1258 |
1269 |
//field number
|
|
1270 |
@Transient
|
1259 |
1271 |
public String getFieldNumber() {
|
1260 |
1272 |
if (! hasFieldObservation()){
|
1261 |
1273 |
return null;
|
... | ... | |
1269 |
1281 |
|
1270 |
1282 |
|
1271 |
1283 |
//field notes
|
|
1284 |
@Transient
|
1272 |
1285 |
public String getFieldNotes() {
|
1273 |
1286 |
if (! hasFieldObservation()){
|
1274 |
1287 |
return null;
|
... | ... | |
1282 |
1295 |
|
1283 |
1296 |
|
1284 |
1297 |
//individual counts
|
|
1298 |
@Transient
|
1285 |
1299 |
public Integer getIndividualCount() {
|
1286 |
1300 |
return (hasFieldObservation()? getFieldObservation(true).getIndividualCount() : null );
|
1287 |
1301 |
}
|
... | ... | |
1290 |
1304 |
}
|
1291 |
1305 |
|
1292 |
1306 |
//life stage
|
|
1307 |
@Transient
|
1293 |
1308 |
public Stage getLifeStage() {
|
1294 |
1309 |
return (hasFieldObservation()? getFieldObservation(true).getLifeStage() : null );
|
1295 |
1310 |
}
|
... | ... | |
1298 |
1313 |
}
|
1299 |
1314 |
|
1300 |
1315 |
//sex
|
|
1316 |
@Transient
|
1301 |
1317 |
public Sex getSex() {
|
1302 |
1318 |
return (hasFieldObservation()? getFieldObservation(true).getSex() : null );
|
1303 |
1319 |
}
|
... | ... | |
1344 |
1360 |
public void addDerivedUnitDefinition(String text, Language language) {
|
1345 |
1361 |
derivedUnit.addDefinition(text, language);
|
1346 |
1362 |
}
|
|
1363 |
@Transient
|
1347 |
1364 |
public Map<Language, LanguageString> getDerivedUnitDefinitions(){
|
1348 |
1365 |
return this.derivedUnit.getDefinition();
|
1349 |
1366 |
}
|
... | ... | |
1406 |
1423 |
* Returns the media for the specimen.<BR>
|
1407 |
1424 |
* @return
|
1408 |
1425 |
*/
|
|
1426 |
@Transient
|
1409 |
1427 |
public List<Media> getDerivedUnitMedia() {
|
1410 |
1428 |
try {
|
1411 |
1429 |
List<Media> result = getMedia(derivedUnit, false);
|
... | ... | |
1432 |
1450 |
derivedUnit.setAccessionNumber(accessionNumber);
|
1433 |
1451 |
}
|
1434 |
1452 |
|
1435 |
|
//Catalog Number
|
|
1453 |
@Transient
|
1436 |
1454 |
public String getCatalogNumber() {
|
1437 |
1455 |
return derivedUnit.getCatalogNumber();
|
1438 |
1456 |
}
|
... | ... | |
1440 |
1458 |
derivedUnit.setCatalogNumber(catalogNumber);
|
1441 |
1459 |
}
|
1442 |
1460 |
|
1443 |
|
//barcode
|
|
1461 |
@Transient
|
1444 |
1462 |
public String getBarcode() {
|
1445 |
1463 |
return derivedUnit.getBarcode();
|
1446 |
1464 |
}
|
... | ... | |
1456 |
1474 |
* @see #DerivedUnitType
|
1457 |
1475 |
* @return
|
1458 |
1476 |
*/
|
|
1477 |
@Transient
|
1459 |
1478 |
public PreservationMethod getPreservationMethod() throws MethodNotSupportedByDerivedUnitTypeException {
|
1460 |
1479 |
if (derivedUnit.isInstanceOf(Specimen.class)){
|
1461 |
1480 |
return CdmBase.deproxy(derivedUnit, Specimen.class).getPreservation();
|
... | ... | |
1485 |
1504 |
}
|
1486 |
1505 |
|
1487 |
1506 |
//Stored under name
|
|
1507 |
@Transient
|
1488 |
1508 |
public TaxonNameBase getStoredUnder() {
|
1489 |
1509 |
return derivedUnit.getStoredUnder();
|
1490 |
1510 |
}
|
... | ... | |
1493 |
1513 |
}
|
1494 |
1514 |
|
1495 |
1515 |
//colletors number
|
|
1516 |
@Transient
|
1496 |
1517 |
public String getCollectorsNumber() {
|
1497 |
1518 |
return derivedUnit.getCollectorsNumber();
|
1498 |
1519 |
}
|
... | ... | |
1537 |
1558 |
}
|
1538 |
1559 |
return result;
|
1539 |
1560 |
}
|
1540 |
|
|
|
1561 |
@Transient
|
1541 |
1562 |
public String getExsiccatum() {
|
1542 |
1563 |
logger.warn("Exsiccatum method not yet supported. Needs model change");
|
1543 |
1564 |
return null;
|
... | ... | |
1565 |
1586 |
derivedUnit.addSource(source);
|
1566 |
1587 |
return source;
|
1567 |
1588 |
}
|
1568 |
|
|
|
1589 |
|
|
1590 |
@Transient
|
1569 |
1591 |
public Set<IdentifiableSource> getSources(){
|
1570 |
1592 |
return derivedUnit.getSources();
|
1571 |
1593 |
}
|
... | ... | |
1578 |
1600 |
/**
|
1579 |
1601 |
* @return the collection
|
1580 |
1602 |
*/
|
|
1603 |
@Transient
|
1581 |
1604 |
public Collection getCollection() {
|
1582 |
1605 |
return derivedUnit.getCollection();
|
1583 |
1606 |
}
|
adding @Transient