@Test void testCreateRfdModelXREF() { when(objectEntity.getEntityType()).thenReturn(entityType); when(entityType.getId()).thenReturn("fdp_Catalog"); when(objectEntity.get("attributeName")).thenReturn(refEntity); when(objectEntity.getEntity("attributeName")).thenReturn(refEntity); when(refEntity.getEntityType()).thenReturn(refEntityType); when(refEntityType.getAttributeNames()).thenReturn(List.of("IRI")); when(refEntity.getString("IRI")).thenReturn("http: when(entityType.getAtomicAttributes()).thenReturn(List.of(attribute)); when(attribute.getName()).thenReturn("attributeName"); when(attribute.getDataType()).thenReturn(XREF); when(tagService.getTagsForAttribute(entityType, attribute)) .thenReturn(ImmutableMultimap.of(isAssociatedWith, labeledResource)); when(labeledResource.getIri()).thenReturn("http: Model result = writer.createRdfModel(objectEntity); assertEquals(1, result.size()); StringWriter writer = new StringWriter(); Rio.write(result, writer, TURTLE, new WriterConfig().set(INLINE_BLANK_NODES, true)); assertThat(writer.toString()) .contains("<http: }
public Model createRdfModel(Entity objectEntity) { Model model = createEmptyModel(); Resource subject = createResource(objectEntity); addEntityToModel(subject, objectEntity, model); return model; }
EntityModelWriter { public Model createRdfModel(Entity objectEntity) { Model model = createEmptyModel(); Resource subject = createResource(objectEntity); addEntityToModel(subject, objectEntity, model); return model; } }
EntityModelWriter { public Model createRdfModel(Entity objectEntity) { Model model = createEmptyModel(); Resource subject = createResource(objectEntity); addEntityToModel(subject, objectEntity, model); return model; } EntityModelWriter(
      TagService<LabeledResource, LabeledResource> tagService, SimpleValueFactory valueFactory); }
EntityModelWriter { public Model createRdfModel(Entity objectEntity) { Model model = createEmptyModel(); Resource subject = createResource(objectEntity); addEntityToModel(subject, objectEntity, model); return model; } EntityModelWriter(
      TagService<LabeledResource, LabeledResource> tagService, SimpleValueFactory valueFactory); Model createRdfModel(Entity objectEntity); Model createEmptyModel(); void addEntityToModel(Resource subject, Entity objectEntity, Model model); boolean isADcatResource(EntityType entityType); }
EntityModelWriter { public Model createRdfModel(Entity objectEntity) { Model model = createEmptyModel(); Resource subject = createResource(objectEntity); addEntityToModel(subject, objectEntity, model); return model; } EntityModelWriter(
      TagService<LabeledResource, LabeledResource> tagService, SimpleValueFactory valueFactory); Model createRdfModel(Entity objectEntity); Model createEmptyModel(); void addEntityToModel(Resource subject, Entity objectEntity, Model model); boolean isADcatResource(EntityType entityType); static final String NS_DCAT; static final String NS_FDP; static final String NS_R3D; static final String NS_DATACITE; static final String NS_DCT; static final String NS_RDF; }