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");
}
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");
}
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");
}
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());
}
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());
}
Aggregations