Search in sources :

Example 6 with SimpleLiteral

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;
    }
}
Also used : SimpleLiteral(org.purl.dc.elements._1.SimpleLiteral)

Example 7 with SimpleLiteral

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;
    }
}
Also used : SimpleLiteral(org.purl.dc.elements._1.SimpleLiteral)

Example 8 with SimpleLiteral

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;
    }
}
Also used : SimpleLiteral(org.purl.dc.elements._1.SimpleLiteral)

Example 9 with SimpleLiteral

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;
    }
}
Also used : SummaryRecordType(net.opengis.cat.csw._3.SummaryRecordType) SimpleLiteral(org.purl.dc.elements._1.SimpleLiteral) BriefRecordType(net.opengis.cat.csw._3.BriefRecordType)

Example 10 with SimpleLiteral

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;
    }
}
Also used : SimpleLiteral(org.purl.dc.elements._1.SimpleLiteral)

Aggregations

SimpleLiteral (org.purl.dc.elements._1.SimpleLiteral)10 Actors (io.fixprotocol._2020.orchestra.repository.Actors)1 Categories (io.fixprotocol._2020.orchestra.repository.Categories)1 CategoryType (io.fixprotocol._2020.orchestra.repository.CategoryType)1 CodeSetType (io.fixprotocol._2020.orchestra.repository.CodeSetType)1 CodeSets (io.fixprotocol._2020.orchestra.repository.CodeSets)1 ComponentRefType (io.fixprotocol._2020.orchestra.repository.ComponentRefType)1 ComponentType (io.fixprotocol._2020.orchestra.repository.ComponentType)1 Components (io.fixprotocol._2020.orchestra.repository.Components)1 Datatypes (io.fixprotocol._2020.orchestra.repository.Datatypes)1 FieldRefType (io.fixprotocol._2020.orchestra.repository.FieldRefType)1 FieldType (io.fixprotocol._2020.orchestra.repository.FieldType)1 Fields (io.fixprotocol._2020.orchestra.repository.Fields)1 GroupRefType (io.fixprotocol._2020.orchestra.repository.GroupRefType)1 GroupType (io.fixprotocol._2020.orchestra.repository.GroupType)1 Groups (io.fixprotocol._2020.orchestra.repository.Groups)1 MessageType (io.fixprotocol._2020.orchestra.repository.MessageType)1 Messages (io.fixprotocol._2020.orchestra.repository.Messages)1 Repository (io.fixprotocol._2020.orchestra.repository.Repository)1 Sections (io.fixprotocol._2020.orchestra.repository.Sections)1