Search in sources :

Example 1 with IsReplacedBy

use of eu.europeana.metis.schema.jibx.IsReplacedBy in project metis-framework by europeana.

the class DereferenceUtilsTest method testProxyListExtractedValues.

@Test
void testProxyListExtractedValues() {
    RDF rdf = new RDF();
    ProxyType proxy = new ProxyType();
    HasMet hasMet = new HasMet();
    hasMet.setResource("http://dummy1.dum");
    ArrayList<HasMet> hasMetList = new ArrayList<>();
    hasMetList.add(hasMet);
    proxy.setHasMetList(hasMetList);
    HasType hasType = new HasType();
    ResourceOrLiteralType.Resource resource2 = new ResourceOrLiteralType.Resource();
    resource2.setResource("http://dummy2.dum");
    hasType.setResource(resource2);
    ArrayList<HasType> hasTypeList = new ArrayList<>();
    hasTypeList.add(hasType);
    proxy.setHasTypeList(hasTypeList);
    Incorporates incorporates = new Incorporates();
    incorporates.setResource("http://dummy3.dum");
    ArrayList<Incorporates> incorporatesList = new ArrayList<>();
    incorporatesList.add(incorporates);
    proxy.setIncorporateList(incorporatesList);
    IsDerivativeOf isDerivativeOf = new IsDerivativeOf();
    isDerivativeOf.setResource("http://dummy4.dum");
    ArrayList<IsDerivativeOf> isDerivativeOfList = new ArrayList<>();
    isDerivativeOfList.add(isDerivativeOf);
    proxy.setIsDerivativeOfList(isDerivativeOfList);
    IsRelatedTo isRelatedTo = new IsRelatedTo();
    ResourceOrLiteralType.Resource resource5 = new ResourceOrLiteralType.Resource();
    resource5.setResource("http://dummy5.dum");
    isRelatedTo.setResource(resource5);
    ArrayList<IsRelatedTo> isRelatedToList = new ArrayList<>();
    isRelatedToList.add(isRelatedTo);
    proxy.setIsRelatedToList(isRelatedToList);
    IsSimilarTo isSimilarTo = new IsSimilarTo();
    isSimilarTo.setResource("http://dummy6.dum");
    ArrayList<IsSimilarTo> isSimilarToList = new ArrayList<>();
    isSimilarToList.add(isSimilarTo);
    proxy.setIsSimilarToList(isSimilarToList);
    IsSuccessorOf isSuccessorOf = new IsSuccessorOf();
    isSuccessorOf.setResource("http://dummy7.dum");
    ArrayList<IsSuccessorOf> isSuccessorOfList = new ArrayList<>();
    isSuccessorOfList.add(isSuccessorOf);
    proxy.setIsSuccessorOfList(isSuccessorOfList);
    Realizes realizes = new Realizes();
    realizes.setResource("http://dummy8.dum");
    ArrayList<Realizes> realizesList = new ArrayList<>();
    realizesList.add(realizes);
    proxy.setRealizeList(realizesList);
    CurrentLocation currentLocation = new CurrentLocation();
    ResourceOrLiteralType.Resource resource9 = new ResourceOrLiteralType.Resource();
    resource9.setResource("http://dummy9.dum");
    currentLocation.setResource(resource9);
    proxy.setCurrentLocation(currentLocation);
    ProxyType.Choice choice11 = new ProxyType.Choice();
    Extent extent = new Extent();
    ResourceOrLiteralType.Resource resource20 = new ResourceOrLiteralType.Resource();
    resource20.setResource("http://dummy20.dum");
    extent.setResource(resource20);
    choice11.setExtent(extent);
    ProxyType.Choice choice13 = new ProxyType.Choice();
    HasFormat hasFormat = new HasFormat();
    ResourceOrLiteralType.Resource resource22 = new ResourceOrLiteralType.Resource();
    resource22.setResource("http://dummy22.dum");
    hasFormat.setResource(resource22);
    choice13.setHasFormat(hasFormat);
    ProxyType.Choice choice14 = new ProxyType.Choice();
    HasPart hasPart = new HasPart();
    ResourceOrLiteralType.Resource resource23 = new ResourceOrLiteralType.Resource();
    resource23.setResource("http://dummy23.dum");
    hasPart.setResource(resource23);
    choice14.setHasPart(hasPart);
    ProxyType.Choice choice15 = new ProxyType.Choice();
    HasVersion hasVersion = new HasVersion();
    ResourceOrLiteralType.Resource resource24 = new ResourceOrLiteralType.Resource();
    resource24.setResource("http://dummy24.dum");
    hasVersion.setResource(resource24);
    choice15.setHasVersion(hasVersion);
    ProxyType.Choice choice18 = new ProxyType.Choice();
    Temporal temporal = new Temporal();
    ResourceOrLiteralType.Resource resource27 = new ResourceOrLiteralType.Resource();
    resource27.setResource("http://dummy27.dum");
    temporal.setResource(resource27);
    choice18.setTemporal(temporal);
    ProxyType.Choice choice19 = new ProxyType.Choice();
    IsFormatOf isFormatOf = new IsFormatOf();
    ResourceOrLiteralType.Resource resource28 = new ResourceOrLiteralType.Resource();
    resource28.setResource("http://dummy28.dum");
    isFormatOf.setResource(resource28);
    choice19.setIsFormatOf(isFormatOf);
    ProxyType.Choice choice20 = new ProxyType.Choice();
    IsPartOf isPartOf = new IsPartOf();
    ResourceOrLiteralType.Resource resource29 = new ResourceOrLiteralType.Resource();
    resource29.setResource("http://dummy29.dum");
    isPartOf.setResource(resource29);
    choice20.setIsPartOf(isPartOf);
    ProxyType.Choice choice21 = new ProxyType.Choice();
    IsReferencedBy isReferencedBy = new IsReferencedBy();
    ResourceOrLiteralType.Resource resource30 = new ResourceOrLiteralType.Resource();
    resource30.setResource("http://dummy30.dum");
    isReferencedBy.setResource(resource30);
    choice21.setIsReferencedBy(isReferencedBy);
    ProxyType.Choice choice29 = new ProxyType.Choice();
    IsReplacedBy isReplacedBy = new IsReplacedBy();
    ResourceOrLiteralType.Resource resource25 = new ResourceOrLiteralType.Resource();
    resource25.setResource("http://dummy25.dum");
    isReplacedBy.setResource(resource25);
    choice29.setIsReplacedBy(isReplacedBy);
    ProxyType.Choice choice22 = new ProxyType.Choice();
    IsRequiredBy isRequiredBy = new IsRequiredBy();
    ResourceOrLiteralType.Resource resource31 = new ResourceOrLiteralType.Resource();
    resource31.setResource("http://dummy31.dum");
    isRequiredBy.setResource(resource31);
    choice22.setIsRequiredBy(isRequiredBy);
    ProxyType.Choice choice23 = new ProxyType.Choice();
    Issued issued = new Issued();
    ResourceOrLiteralType.Resource resource32 = new ResourceOrLiteralType.Resource();
    resource32.setResource("http://dummy32.dum");
    issued.setResource(resource32);
    choice23.setIssued(issued);
    ProxyType.Choice choice24 = new ProxyType.Choice();
    IsVersionOf isVersionOf = new IsVersionOf();
    ResourceOrLiteralType.Resource resource33 = new ResourceOrLiteralType.Resource();
    resource33.setResource("http://dummy33.dum");
    isVersionOf.setResource(resource33);
    choice24.setIsVersionOf(isVersionOf);
    ProxyType.Choice choice25 = new ProxyType.Choice();
    Medium medium = new Medium();
    ResourceOrLiteralType.Resource resource34 = new ResourceOrLiteralType.Resource();
    resource34.setResource("http://dummy34.dum");
    medium.setResource(resource34);
    choice25.setMedium(medium);
    ProxyType.Choice choice30 = new ProxyType.Choice();
    Publisher publisher = new Publisher();
    ResourceOrLiteralType.Resource resource36 = new ResourceOrLiteralType.Resource();
    resource36.setResource("http://dummy36.dum");
    publisher.setResource(resource36);
    choice30.setPublisher(publisher);
    ProxyType.Choice choice31 = new ProxyType.Choice();
    References references = new References();
    ResourceOrLiteralType.Resource resource37 = new ResourceOrLiteralType.Resource();
    resource37.setResource("http://dummy37.dum");
    references.setResource(resource37);
    choice31.setReferences(references);
    ProxyType.Choice choice32 = new ProxyType.Choice();
    Relation relation = new Relation();
    ResourceOrLiteralType.Resource resource38 = new ResourceOrLiteralType.Resource();
    resource38.setResource("http://dummy38.dum");
    relation.setResource(resource38);
    choice32.setRelation(relation);
    ProxyType.Choice choice33 = new ProxyType.Choice();
    Replaces replaces = new Replaces();
    ResourceOrLiteralType.Resource resource39 = new ResourceOrLiteralType.Resource();
    resource39.setResource("http://dummy39.dum");
    replaces.setResource(resource39);
    choice33.setReplaces(replaces);
    ProxyType.Choice choice34 = new ProxyType.Choice();
    Source source = new Source();
    ResourceOrLiteralType.Resource resource40 = new ResourceOrLiteralType.Resource();
    resource40.setResource("http://dummy40.dum");
    source.setResource(resource40);
    choice34.setSource(source);
    // Should be rejected
    ProxyType.Choice choice27 = new ProxyType.Choice();
    Alternative alternative = new Alternative();
    alternative.setString("Alternative");
    choice27.setAlternative(alternative);
    ArrayList<ProxyType.Choice> choiceList = new ArrayList<>();
    choiceList.add(choice11);
    choiceList.add(choice13);
    choiceList.add(choice14);
    choiceList.add(choice15);
    choiceList.add(choice18);
    choiceList.add(choice19);
    choiceList.add(choice20);
    choiceList.add(choice21);
    choiceList.add(choice22);
    choiceList.add(choice23);
    choiceList.add(choice24);
    choiceList.add(choice25);
    choiceList.add(choice27);
    choiceList.add(choice29);
    choiceList.add(choice30);
    choiceList.add(choice31);
    choiceList.add(choice32);
    choiceList.add(choice33);
    choiceList.add(choice34);
    proxy.setChoiceList(choiceList);
    ArrayList<ProxyType> proxyList = new ArrayList<>();
    proxyList.add(proxy);
    rdf.setProxyList(proxyList);
    Set<String> result = DereferenceUtils.extractReferencesForDereferencing(rdf);
    assertNotNull(result);
    assertEquals(25, result.size());
    assertTrue(result.contains("http://dummy1.dum"));
    assertTrue(result.contains("http://dummy2.dum"));
    assertTrue(result.contains("http://dummy3.dum"));
    assertTrue(result.contains("http://dummy4.dum"));
    assertTrue(result.contains("http://dummy5.dum"));
    assertTrue(result.contains("http://dummy6.dum"));
    assertTrue(result.contains("http://dummy7.dum"));
    assertTrue(result.contains("http://dummy8.dum"));
    assertTrue(result.contains("http://dummy9.dum"));
    assertTrue(result.contains("http://dummy20.dum"));
    assertTrue(result.contains("http://dummy22.dum"));
    assertTrue(result.contains("http://dummy25.dum"));
    assertTrue(result.contains("http://dummy28.dum"));
    assertTrue(result.contains("http://dummy30.dum"));
    assertTrue(result.contains("http://dummy31.dum"));
    assertTrue(result.contains("http://dummy33.dum"));
    assertTrue(result.contains("http://dummy36.dum"));
    assertTrue(result.contains("http://dummy37.dum"));
    assertTrue(result.contains("http://dummy38.dum"));
    assertTrue(result.contains("http://dummy39.dum"));
    assertTrue(result.contains("http://dummy40.dum"));
}
Also used : Realizes(eu.europeana.metis.schema.jibx.Realizes) Choice(eu.europeana.metis.schema.jibx.Concept.Choice) Extent(eu.europeana.metis.schema.jibx.Extent) ArrayList(java.util.ArrayList) Resource(eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource) HasPart(eu.europeana.metis.schema.jibx.HasPart) Source(eu.europeana.metis.schema.jibx.Source) IsSimilarTo(eu.europeana.metis.schema.jibx.IsSimilarTo) Relation(eu.europeana.metis.schema.jibx.Relation) HasFormat(eu.europeana.metis.schema.jibx.HasFormat) IsFormatOf(eu.europeana.metis.schema.jibx.IsFormatOf) HasVersion(eu.europeana.metis.schema.jibx.HasVersion) Temporal(eu.europeana.metis.schema.jibx.Temporal) RDF(eu.europeana.metis.schema.jibx.RDF) HasType(eu.europeana.metis.schema.jibx.HasType) Issued(eu.europeana.metis.schema.jibx.Issued) CurrentLocation(eu.europeana.metis.schema.jibx.CurrentLocation) Alternative(eu.europeana.metis.schema.jibx.Alternative) IsPartOf(eu.europeana.metis.schema.jibx.IsPartOf) IsReplacedBy(eu.europeana.metis.schema.jibx.IsReplacedBy) Resource(eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource) IsDerivativeOf(eu.europeana.metis.schema.jibx.IsDerivativeOf) HasMet(eu.europeana.metis.schema.jibx.HasMet) IsReferencedBy(eu.europeana.metis.schema.jibx.IsReferencedBy) IsRequiredBy(eu.europeana.metis.schema.jibx.IsRequiredBy) Publisher(eu.europeana.metis.schema.jibx.Publisher) Replaces(eu.europeana.metis.schema.jibx.Replaces) IsRelatedTo(eu.europeana.metis.schema.jibx.IsRelatedTo) IsVersionOf(eu.europeana.metis.schema.jibx.IsVersionOf) Incorporates(eu.europeana.metis.schema.jibx.Incorporates) IsSuccessorOf(eu.europeana.metis.schema.jibx.IsSuccessorOf) Medium(eu.europeana.metis.schema.jibx.Medium) References(eu.europeana.metis.schema.jibx.References) ProxyType(eu.europeana.metis.schema.jibx.ProxyType) ResourceOrLiteralType(eu.europeana.metis.schema.jibx.ResourceOrLiteralType) Test(org.junit.jupiter.api.Test)

Example 2 with IsReplacedBy

use of eu.europeana.metis.schema.jibx.IsReplacedBy in project metis-framework by europeana.

the class ProxyFieldInputTest method createEuropeanaTermsList.

private List<EuropeanaType.Choice> createEuropeanaTermsList() {
    List<EuropeanaType.Choice> dctermsList = new ArrayList<>();
    EuropeanaType.Choice choiceAlternative = new EuropeanaType.Choice();
    Alternative alternative = new Alternative();
    alternative.setString("test alternative");
    choiceAlternative.setAlternative(alternative);
    dctermsList.add(choiceAlternative);
    EuropeanaType.Choice choiceConformsTo = new EuropeanaType.Choice();
    ConformsTo conformsTo = new ConformsTo();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource conformsResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    conformsResource.setResource("test conforms to");
    conformsTo.setResource(conformsResource);
    choiceConformsTo.setConformsTo(conformsTo);
    dctermsList.add(choiceConformsTo);
    EuropeanaType.Choice choiceCreated = new EuropeanaType.Choice();
    Created created = new Created();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource createdResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    createdResource.setResource("test created");
    created.setResource(createdResource);
    choiceCreated.setCreated(created);
    dctermsList.add(choiceCreated);
    EuropeanaType.Choice choiceExtent = new EuropeanaType.Choice();
    Extent extent = new Extent();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource extentResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    extentResource.setResource("test extent");
    extent.setResource(extentResource);
    choiceExtent.setExtent(extent);
    dctermsList.add(choiceExtent);
    EuropeanaType.Choice choiceHasFormat = new EuropeanaType.Choice();
    HasFormat hasFormat = new HasFormat();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource choiceHasFormatResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    choiceHasFormatResource.setResource("test hasFormat");
    hasFormat.setResource(choiceHasFormatResource);
    choiceHasFormat.setHasFormat(hasFormat);
    dctermsList.add(choiceHasFormat);
    EuropeanaType.Choice choiceHasPart = new EuropeanaType.Choice();
    HasPart hasPart = new HasPart();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource hasPartResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    hasPartResource.setResource("test hasPart");
    hasPart.setResource(hasPartResource);
    choiceHasPart.setHasPart(hasPart);
    dctermsList.add(choiceHasPart);
    EuropeanaType.Choice choiceHasVersion = new EuropeanaType.Choice();
    HasVersion hasVersion = new HasVersion();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource hasVersionResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    hasVersionResource.setResource("test hasVersion");
    hasVersion.setResource(hasVersionResource);
    choiceHasVersion.setHasVersion(hasVersion);
    dctermsList.add(choiceHasVersion);
    EuropeanaType.Choice choiceIsFormatOf = new EuropeanaType.Choice();
    IsFormatOf isFormatOf = new IsFormatOf();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource isFormatOfResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    isFormatOfResource.setResource("test isFormatOf");
    isFormatOf.setResource(isFormatOfResource);
    choiceIsFormatOf.setIsFormatOf(isFormatOf);
    dctermsList.add(choiceIsFormatOf);
    EuropeanaType.Choice choiceIsPartOf = new EuropeanaType.Choice();
    IsPartOf isPartOf = new IsPartOf();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource isPartOfResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    isPartOfResource.setResource("test isPartOf");
    isPartOf.setResource(isPartOfResource);
    choiceIsPartOf.setIsPartOf(isPartOf);
    dctermsList.add(choiceIsPartOf);
    EuropeanaType.Choice choiceIsReferencedBy = new EuropeanaType.Choice();
    IsReferencedBy isReferencedBy = new IsReferencedBy();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource isReferencedByResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    isReferencedByResource.setResource("test isReferencedBy");
    isReferencedBy.setResource(isReferencedByResource);
    choiceIsReferencedBy.setIsReferencedBy(isReferencedBy);
    dctermsList.add(choiceIsReferencedBy);
    EuropeanaType.Choice choiceIsReplacedBy = new EuropeanaType.Choice();
    IsReplacedBy isReplacedBy = new IsReplacedBy();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource isReplacedByResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    isReplacedByResource.setResource("test isReplacedBy");
    isReplacedBy.setResource(isReplacedByResource);
    choiceIsReplacedBy.setIsReplacedBy(isReplacedBy);
    dctermsList.add(choiceIsReplacedBy);
    EuropeanaType.Choice choiceIsRequiredBy = new EuropeanaType.Choice();
    IsRequiredBy isRequiredBy = new IsRequiredBy();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource isRequiredByResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    isRequiredByResource.setResource("test isRequiredBy");
    isRequiredBy.setResource(isRequiredByResource);
    choiceIsRequiredBy.setIsRequiredBy(isRequiredBy);
    dctermsList.add(choiceIsRequiredBy);
    EuropeanaType.Choice choiceIssued = new EuropeanaType.Choice();
    Issued issued = new Issued();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource issuedResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    issuedResource.setResource("test issued");
    issued.setResource(issuedResource);
    choiceIssued.setIssued(issued);
    dctermsList.add(choiceIssued);
    EuropeanaType.Choice choiceIsVersionOf = new EuropeanaType.Choice();
    IsVersionOf isVersionOf = new IsVersionOf();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource isVersionOfResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    isVersionOfResource.setResource("test isVersionOf");
    isVersionOf.setResource(isVersionOfResource);
    choiceIsVersionOf.setIsVersionOf(isVersionOf);
    dctermsList.add(choiceIsVersionOf);
    EuropeanaType.Choice choiceMedium = new EuropeanaType.Choice();
    Medium medium = new Medium();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource mediumResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    mediumResource.setResource("test medium");
    medium.setResource(mediumResource);
    choiceMedium.setMedium(medium);
    dctermsList.add(choiceMedium);
    EuropeanaType.Choice choiceProvenance = new EuropeanaType.Choice();
    Provenance provenance = new Provenance();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource provenanceResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    provenanceResource.setResource("test provenance");
    provenance.setResource(provenanceResource);
    choiceProvenance.setProvenance(provenance);
    dctermsList.add(choiceProvenance);
    EuropeanaType.Choice choiceReferences = new EuropeanaType.Choice();
    References references = new References();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource referencesResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    referencesResource.setResource("test references");
    references.setResource(referencesResource);
    choiceReferences.setReferences(references);
    dctermsList.add(choiceReferences);
    EuropeanaType.Choice choiceReplaces = new EuropeanaType.Choice();
    Replaces replaces = new Replaces();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource replacesResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    replacesResource.setResource("test replaces");
    replaces.setResource(replacesResource);
    choiceReplaces.setReplaces(replaces);
    dctermsList.add(choiceReplaces);
    EuropeanaType.Choice choiceRequires = new EuropeanaType.Choice();
    Requires requires = new Requires();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource requiresResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    requiresResource.setResource("test requires");
    requires.setResource(requiresResource);
    choiceRequires.setRequires(requires);
    dctermsList.add(choiceRequires);
    EuropeanaType.Choice choiceSpatial = new EuropeanaType.Choice();
    Spatial spatial = new Spatial();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource spatialResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    spatialResource.setResource("test spatial");
    spatial.setResource(spatialResource);
    choiceSpatial.setSpatial(spatial);
    dctermsList.add(choiceSpatial);
    EuropeanaType.Choice choiceTableOfContents = new EuropeanaType.Choice();
    TableOfContents tableOfContents = new TableOfContents();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource tableOfContentsResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    tableOfContentsResource.setResource("test TOC");
    tableOfContents.setResource(tableOfContentsResource);
    choiceTableOfContents.setTableOfContents(tableOfContents);
    dctermsList.add(choiceTableOfContents);
    EuropeanaType.Choice choiceTemporal = new EuropeanaType.Choice();
    Temporal temporal = new Temporal();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource temporalResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    temporalResource.setResource("temporal");
    temporal.setResource(temporalResource);
    choiceTemporal.setTemporal(temporal);
    dctermsList.add(choiceTemporal);
    EuropeanaType.Choice choiceContributor = new EuropeanaType.Choice();
    Contributor contributor = new Contributor();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource contributorResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    contributorResource.setResource("test contributor");
    contributor.setResource(contributorResource);
    choiceContributor.setContributor(contributor);
    dctermsList.add(choiceContributor);
    EuropeanaType.Choice choiceCoverage = new EuropeanaType.Choice();
    Coverage coverage = new Coverage();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource coverageResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    coverageResource.setResource("test coverage");
    coverage.setResource(coverageResource);
    choiceCoverage.setCoverage(coverage);
    dctermsList.add(choiceCoverage);
    EuropeanaType.Choice choiceCreator = new EuropeanaType.Choice();
    Creator creator = new Creator();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource creatorResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    creatorResource.setResource("test creator");
    creator.setResource(creatorResource);
    choiceCreator.setCreator(creator);
    dctermsList.add(choiceCreator);
    EuropeanaType.Choice choiceDate = new EuropeanaType.Choice();
    Date date = new Date();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource dateResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    dateResource.setResource("test date");
    date.setResource(dateResource);
    choiceDate.setDate(date);
    dctermsList.add(choiceDate);
    EuropeanaType.Choice choiceDescription = new EuropeanaType.Choice();
    Description description = new Description();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource descriptionResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    descriptionResource.setResource("test description");
    description.setResource(descriptionResource);
    choiceDescription.setDescription(description);
    dctermsList.add(choiceDescription);
    EuropeanaType.Choice choiceFormat = new EuropeanaType.Choice();
    Format format = new Format();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource formatResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    formatResource.setResource("test format");
    format.setResource(formatResource);
    choiceFormat.setFormat(format);
    dctermsList.add(choiceFormat);
    EuropeanaType.Choice choiceIdentifier = new EuropeanaType.Choice();
    Identifier identifier = new Identifier();
    identifier.setString("test identifier");
    choiceIdentifier.setIdentifier(identifier);
    dctermsList.add(choiceIdentifier);
    EuropeanaType.Choice choiceLanguage = new EuropeanaType.Choice();
    Language language = new Language();
    language.setString("test language");
    choiceLanguage.setLanguage(language);
    dctermsList.add(choiceLanguage);
    EuropeanaType.Choice choicePublisher = new EuropeanaType.Choice();
    Publisher publisher = new Publisher();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource publisherResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    publisherResource.setResource("test publisher");
    publisher.setResource(publisherResource);
    choicePublisher.setPublisher(publisher);
    dctermsList.add(choicePublisher);
    EuropeanaType.Choice choiceRelation = new EuropeanaType.Choice();
    Relation relation = new Relation();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource relationResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    relationResource.setResource("test relation");
    relation.setResource(relationResource);
    choiceRelation.setRelation(relation);
    dctermsList.add(choiceRelation);
    EuropeanaType.Choice choiceRights = new EuropeanaType.Choice();
    Rights rights = new Rights();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource rightsResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    rightsResource.setResource("test rights");
    rights.setResource(rightsResource);
    choiceRights.setRights(rights);
    dctermsList.add(choiceRights);
    EuropeanaType.Choice choiceSource = new EuropeanaType.Choice();
    Source source = new Source();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource sourceResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    sourceResource.setResource("test source");
    source.setResource(sourceResource);
    choiceSource.setSource(source);
    dctermsList.add(choiceSource);
    EuropeanaType.Choice choiceSubject = new EuropeanaType.Choice();
    Subject subject = new Subject();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource subjectResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    subjectResource.setResource("test subject");
    subject.setResource(subjectResource);
    choiceSubject.setSubject(subject);
    dctermsList.add(choiceSubject);
    EuropeanaType.Choice choiceTitle = new EuropeanaType.Choice();
    Title title = new Title();
    title.setString("test title");
    choiceTitle.setTitle(title);
    dctermsList.add(choiceTitle);
    EuropeanaType.Choice choiceType = new EuropeanaType.Choice();
    Type type = new Type();
    eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource typeResource = new eu.europeana.metis.schema.jibx.ResourceOrLiteralType.Resource();
    typeResource.setResource("test type");
    type.setResource(typeResource);
    choiceType.setType(type);
    dctermsList.add(choiceType);
    return dctermsList;
}
Also used : Provenance(eu.europeana.metis.schema.jibx.Provenance) ArrayList(java.util.ArrayList) TableOfContents(eu.europeana.metis.schema.jibx.TableOfContents) Creator(eu.europeana.metis.schema.jibx.Creator) Rights(eu.europeana.metis.schema.jibx.Rights) Identifier(eu.europeana.metis.schema.jibx.Identifier) HasVersion(eu.europeana.metis.schema.jibx.HasVersion) Alternative(eu.europeana.metis.schema.jibx.Alternative) Requires(eu.europeana.metis.schema.jibx.Requires) IsPartOf(eu.europeana.metis.schema.jibx.IsPartOf) IsReplacedBy(eu.europeana.metis.schema.jibx.IsReplacedBy) ConformsTo(eu.europeana.metis.schema.jibx.ConformsTo) Spatial(eu.europeana.metis.schema.jibx.Spatial) Medium(eu.europeana.metis.schema.jibx.Medium) Description(eu.europeana.metis.schema.jibx.Description) EuropeanaType(eu.europeana.metis.schema.jibx.EuropeanaType) Extent(eu.europeana.metis.schema.jibx.Extent) Contributor(eu.europeana.metis.schema.jibx.Contributor) HasPart(eu.europeana.metis.schema.jibx.HasPart) Source(eu.europeana.metis.schema.jibx.Source) Created(eu.europeana.metis.schema.jibx.Created) Relation(eu.europeana.metis.schema.jibx.Relation) HasFormat(eu.europeana.metis.schema.jibx.HasFormat) IsFormatOf(eu.europeana.metis.schema.jibx.IsFormatOf) HasFormat(eu.europeana.metis.schema.jibx.HasFormat) Format(eu.europeana.metis.schema.jibx.Format) Temporal(eu.europeana.metis.schema.jibx.Temporal) Language(eu.europeana.metis.schema.jibx.Language) Issued(eu.europeana.metis.schema.jibx.Issued) Title(eu.europeana.metis.schema.jibx.Title) Coverage(eu.europeana.metis.schema.jibx.Coverage) IsReferencedBy(eu.europeana.metis.schema.jibx.IsReferencedBy) IsRequiredBy(eu.europeana.metis.schema.jibx.IsRequiredBy) Replaces(eu.europeana.metis.schema.jibx.Replaces) Publisher(eu.europeana.metis.schema.jibx.Publisher) IsVersionOf(eu.europeana.metis.schema.jibx.IsVersionOf) Date(eu.europeana.metis.schema.jibx.Date) Subject(eu.europeana.metis.schema.jibx.Subject) EuropeanaType(eu.europeana.metis.schema.jibx.EuropeanaType) Type(eu.europeana.metis.schema.jibx.Type) EdmType(eu.europeana.metis.schema.jibx.EdmType) ProxyType(eu.europeana.metis.schema.jibx.ProxyType) References(eu.europeana.metis.schema.jibx.References)

Aggregations

Alternative (eu.europeana.metis.schema.jibx.Alternative)2 Extent (eu.europeana.metis.schema.jibx.Extent)2 HasFormat (eu.europeana.metis.schema.jibx.HasFormat)2 HasPart (eu.europeana.metis.schema.jibx.HasPart)2 HasVersion (eu.europeana.metis.schema.jibx.HasVersion)2 IsFormatOf (eu.europeana.metis.schema.jibx.IsFormatOf)2 IsPartOf (eu.europeana.metis.schema.jibx.IsPartOf)2 IsReferencedBy (eu.europeana.metis.schema.jibx.IsReferencedBy)2 IsReplacedBy (eu.europeana.metis.schema.jibx.IsReplacedBy)2 IsRequiredBy (eu.europeana.metis.schema.jibx.IsRequiredBy)2 IsVersionOf (eu.europeana.metis.schema.jibx.IsVersionOf)2 Issued (eu.europeana.metis.schema.jibx.Issued)2 Medium (eu.europeana.metis.schema.jibx.Medium)2 ProxyType (eu.europeana.metis.schema.jibx.ProxyType)2 Publisher (eu.europeana.metis.schema.jibx.Publisher)2 References (eu.europeana.metis.schema.jibx.References)2 Relation (eu.europeana.metis.schema.jibx.Relation)2 Replaces (eu.europeana.metis.schema.jibx.Replaces)2 Source (eu.europeana.metis.schema.jibx.Source)2 Temporal (eu.europeana.metis.schema.jibx.Temporal)2