use of org.purl.dc.elements._1.SimpleLiteral in project ARLAS-server by gisaia.
the class RecordBuilder method addTitle.
public static void addTitle(AbstractRecordType abstractRecordType, String title) {
SimpleLiteral simpleLiteral = new SimpleLiteral();
simpleLiteral.getContent().add(title);
JAXBElement<SimpleLiteral> JAXBElementTitle = dcObjectFactory.createTitle(simpleLiteral);
switch(abstractRecordType.getClass().getSimpleName()) {
case "BriefRecordType":
((BriefRecordType) abstractRecordType).getTitle().add(JAXBElementTitle);
break;
case "SummaryRecordType":
((SummaryRecordType) abstractRecordType).getTitle().add(JAXBElementTitle);
break;
case "RecordType":
((RecordType) abstractRecordType).getDCElement().add(JAXBElementTitle);
break;
}
}
use of org.purl.dc.elements._1.SimpleLiteral in project ARLAS-server by gisaia.
the class RecordBuilder method addFormat.
public static void addFormat(AbstractRecordType abstractRecordType, String format) {
SimpleLiteral simpleLiteral = new SimpleLiteral();
if (format == null || format.equals("")) {
format = "unknown";
}
simpleLiteral.getContent().add(format);
JAXBElement<SimpleLiteral> JAXBElementFormat = dcObjectFactory.createFormat(simpleLiteral);
switch(abstractRecordType.getClass().getSimpleName()) {
case "SummaryRecordType":
((SummaryRecordType) abstractRecordType).getFormat().add(JAXBElementFormat);
break;
case "RecordType":
((RecordType) abstractRecordType).getDCElement().add(JAXBElementFormat);
break;
}
}
use of org.purl.dc.elements._1.SimpleLiteral in project ARLAS-server by gisaia.
the class RecordBuilder method addIdentifier.
public static void addIdentifier(AbstractRecordType abstractRecordType, String identifier) {
SimpleLiteral simpleLiteral = new SimpleLiteral();
simpleLiteral.getContent().add(identifier);
JAXBElement<SimpleLiteral> JAXBElementIdentifier = dcObjectFactory.createIdentifier(simpleLiteral);
switch(abstractRecordType.getClass().getSimpleName()) {
case "BriefRecordType":
((BriefRecordType) abstractRecordType).getIdentifier().add(JAXBElementIdentifier);
break;
case "SummaryRecordType":
((SummaryRecordType) abstractRecordType).getIdentifier().add(JAXBElementIdentifier);
break;
case "RecordType":
((RecordType) abstractRecordType).getDCElement().add(JAXBElementIdentifier);
break;
}
}
use of org.purl.dc.elements._1.SimpleLiteral in project ARLAS-server by gisaia.
the class RecordBuilder method addType.
public static void addType(AbstractRecordType abstractRecordType, String type) {
SimpleLiteral simpleLiteral = new SimpleLiteral();
simpleLiteral.getContent().add(type);
switch(abstractRecordType.getClass().getSimpleName()) {
case "BriefRecordType":
((BriefRecordType) abstractRecordType).setType(simpleLiteral);
break;
case "SummaryRecordType":
((SummaryRecordType) abstractRecordType).setType(simpleLiteral);
break;
case "RecordType":
JAXBElement<SimpleLiteral> JAXBElementType = dcObjectFactory.createType(simpleLiteral);
((RecordType) abstractRecordType).getDCElement().add(JAXBElementType);
break;
}
}
use of org.purl.dc.elements._1.SimpleLiteral in project ARLAS-server by gisaia.
the class RecordBuilder method addAbstract.
public static void addAbstract(AbstractRecordType abstractRecordType, String description) {
SimpleLiteral simpleLiteral = new SimpleLiteral();
simpleLiteral.getContent().add(description);
switch(abstractRecordType.getClass().getSimpleName()) {
case "SummaryRecordType":
((SummaryRecordType) abstractRecordType).getAbstract().add(simpleLiteral);
break;
case "RecordType":
JAXBElement<SimpleLiteral> JAXBElementAbstract = dcObjectFactory.createDescription(simpleLiteral);
((RecordType) abstractRecordType).getDCElement().add(JAXBElementAbstract);
break;
}
}
Aggregations