Search in sources :

Example 56 with Keywords

use of org.geotoolkit.sml.xml.v100.Keywords in project ORCID-Source by ORCID.

the class ValidateV2RC4SamplesTest method testMarshallKeyword.

@Test
public void testMarshallKeyword() throws JAXBException, SAXException, URISyntaxException {
    Keywords object = (Keywords) unmarshallFromPath("/record_2.0_rc4/samples/keywords-2.0_rc4.xml", Keywords.class);
    marshall(object, "/record_2.0_rc4/keyword-2.0_rc4.xsd");
}
Also used : Keywords(org.orcid.jaxb.model.record_rc4.Keywords) Test(org.junit.Test)

Example 57 with Keywords

use of org.geotoolkit.sml.xml.v100.Keywords in project ORCID-Source by ORCID.

the class ValidateV2RC3SamplesTest method testMarshallKeyword.

@Test
public void testMarshallKeyword() throws JAXBException, SAXException, URISyntaxException {
    Keywords object = (Keywords) unmarshallFromPath("/record_2.0_rc3/samples/keywords-2.0_rc3.xml", Keywords.class);
    marshall(object, "/record_2.0_rc3/keyword-2.0_rc3.xsd");
}
Also used : Keywords(org.orcid.jaxb.model.record_rc3.Keywords) Test(org.junit.Test)

Example 58 with Keywords

use of org.geotoolkit.sml.xml.v100.Keywords in project ORCID-Source by ORCID.

the class ValidateV2_1SamplesTest method testMarshallKeyword.

@Test
public void testMarshallKeyword() throws JAXBException, SAXException, URISyntaxException {
    Keywords object = (Keywords) unmarshallFromPath("/record_2.1/samples/read_samples/keywords-2.1.xml", Keywords.class);
    marshall(object, "/record_2.1/keyword-2.1.xsd");
}
Also used : Keywords(org.orcid.jaxb.model.record_v2.Keywords) Test(org.junit.Test)

Example 59 with Keywords

use of org.geotoolkit.sml.xml.v100.Keywords in project ORCID-Source by ORCID.

the class ValidateV2RC4SamplesTest method testUnmarshallKeyword.

@Test
public void testUnmarshallKeyword() throws SAXException, URISyntaxException {
    Keywords keywords = (Keywords) unmarshallFromPath("/record_2.0_rc4/samples/keywords-2.0_rc4.xml", Keywords.class, "/record_2.0_rc4/keyword-2.0_rc4.xsd");
    assertNotNull(keywords);
    assertNotNull(keywords.getKeywords());
    assertEquals(2, keywords.getKeywords().size());
    for (Keyword keyword : keywords.getKeywords()) {
        assertThat(keyword.getContent(), anyOf(is("keyword1"), is("keyword2")));
        assertThat(keyword.getPutCode(), anyOf(is(Long.valueOf(1)), is(Long.valueOf(2))));
        assertEquals(Visibility.PUBLIC.value(), keyword.getVisibility().value());
        assertNotNull(keyword.getCreatedDate());
        assertNotNull(keyword.getLastModifiedDate());
        assertNotNull(keyword.getSource());
        assertEquals("8888-8888-8888-8880", keyword.getSource().retrieveSourcePath());
    }
    Keyword keyword = (Keyword) unmarshallFromPath("/record_2.0_rc4/samples/keyword-2.0_rc4.xml", Keyword.class);
    assertNotNull(keyword);
    assertEquals("keyword1", keyword.getContent());
    assertEquals(Long.valueOf(1), keyword.getPutCode());
    assertEquals(Visibility.PUBLIC.value(), keyword.getVisibility().value());
    assertNotNull(keyword.getCreatedDate());
    assertNotNull(keyword.getLastModifiedDate());
    assertNotNull(keyword.getSource());
    assertEquals("8888-8888-8888-8880", keyword.getSource().retrieveSourcePath());
}
Also used : Keywords(org.orcid.jaxb.model.record_rc4.Keywords) Keyword(org.orcid.jaxb.model.record_rc4.Keyword) Test(org.junit.Test)

Example 60 with Keywords

use of org.geotoolkit.sml.xml.v100.Keywords in project ORCID-Source by ORCID.

the class ValidateV2SamplesTest method testUnmarshallKeyword.

@Test
public void testUnmarshallKeyword() throws SAXException, URISyntaxException {
    Keywords keywords = (Keywords) unmarshallFromPath("/record_2.0/samples/read_samples/keywords-2.0.xml", Keywords.class, "/record_2.0/keyword-2.0.xsd");
    assertNotNull(keywords);
    assertNotNull(keywords.getKeywords());
    assertEquals(2, keywords.getKeywords().size());
    for (Keyword keyword : keywords.getKeywords()) {
        assertThat(keyword.getContent(), anyOf(is("keyword1"), is("keyword2")));
        assertThat(keyword.getPutCode(), anyOf(is(Long.valueOf(1)), is(Long.valueOf(2))));
        assertEquals(Visibility.PUBLIC.value(), keyword.getVisibility().value());
        assertNotNull(keyword.getCreatedDate());
        assertNotNull(keyword.getLastModifiedDate());
        assertNotNull(keyword.getSource());
        assertEquals("8888-8888-8888-8880", keyword.getSource().retrieveSourcePath());
    }
    Keyword keyword = (Keyword) unmarshallFromPath("/record_2.0/samples/read_samples/keyword-2.0.xml", Keyword.class);
    assertNotNull(keyword);
    assertEquals("keyword1", keyword.getContent());
    assertEquals(Long.valueOf(1), keyword.getPutCode());
    assertEquals(Visibility.PUBLIC.value(), keyword.getVisibility().value());
    assertNotNull(keyword.getCreatedDate());
    assertNotNull(keyword.getLastModifiedDate());
    assertNotNull(keyword.getSource());
    assertEquals("8888-8888-8888-8880", keyword.getSource().retrieveSourcePath());
}
Also used : Keywords(org.orcid.jaxb.model.record_v2.Keywords) Keyword(org.orcid.jaxb.model.record_v2.Keyword) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)54 Keywords (org.orcid.jaxb.model.record_v2.Keywords)51 Keyword (org.orcid.jaxb.model.record_v2.Keyword)40 Addresses (org.orcid.jaxb.model.record_v2.Addresses)35 OtherNames (org.orcid.jaxb.model.record_v2.OtherNames)35 PersonExternalIdentifiers (org.orcid.jaxb.model.record_v2.PersonExternalIdentifiers)35 ResearcherUrls (org.orcid.jaxb.model.record_v2.ResearcherUrls)35 Biography (org.orcid.jaxb.model.record_v2.Biography)33 Emails (org.orcid.jaxb.model.record_v2.Emails)33 Address (org.orcid.jaxb.model.record_v2.Address)32 OtherName (org.orcid.jaxb.model.record_v2.OtherName)32 Email (org.orcid.jaxb.model.record_v2.Email)31 PersonExternalIdentifier (org.orcid.jaxb.model.record_v2.PersonExternalIdentifier)31 ResearcherUrl (org.orcid.jaxb.model.record_v2.ResearcherUrl)31 Name (org.orcid.jaxb.model.record_v2.Name)28 Person (org.orcid.jaxb.model.record_v2.Person)25 EducationSummary (org.orcid.jaxb.model.record.summary_v2.EducationSummary)15 EmploymentSummary (org.orcid.jaxb.model.record.summary_v2.EmploymentSummary)15 FundingSummary (org.orcid.jaxb.model.record.summary_v2.FundingSummary)15 PeerReviewSummary (org.orcid.jaxb.model.record.summary_v2.PeerReviewSummary)15