Search in sources :

Example 81 with Vre

use of nl.knaw.huygens.timbuctoo.model.vre.Vre in project timbuctoo by HuygensING.

the class PrepareForBiaImportMigration method addConceptsCollectionToAdminVre.

private void addConceptsCollectionToAdminVre(Graph graph) {
    final Vre adminVre = mappings.getVre("Admin");
    final LinkedHashMap<String, ReadableProperty> conceptProperties = Maps.newLinkedHashMap();
    conceptProperties.put("label", localProperty("label"));
    final Collection conceptsCollection = new Collection("concept", "concept", localProperty("label"), conceptProperties, "concepts", mappings.getVre("Admin"), "concepts", false, false, null);
    adminVre.addCollection(conceptsCollection);
    adminVre.save(graph);
}
Also used : ReadableProperty(nl.knaw.huygens.timbuctoo.model.properties.ReadableProperty) Vre(nl.knaw.huygens.timbuctoo.model.vre.Vre) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection)

Aggregations

Vre (nl.knaw.huygens.timbuctoo.model.vre.Vre)81 Test (org.junit.Test)71 TinkerPopGraphManager (nl.knaw.huygens.timbuctoo.server.TinkerPopGraphManager)48 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)46 VreStubs.minimalCorrectVre (nl.knaw.huygens.timbuctoo.model.vre.VreStubs.minimalCorrectVre)44 VertexMatcher.likeVertex (nl.knaw.huygens.timbuctoo.util.VertexMatcher.likeVertex)43 Collection (nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection)41 Matchers.containsString (org.hamcrest.Matchers.containsString)35 List (java.util.List)34 Lists (com.google.common.collect.Lists)32 Optional (java.util.Optional)31 RdfProperty (nl.knaw.huygens.timbuctoo.core.dto.rdf.RdfProperty)31 CreateCollection (nl.knaw.huygens.timbuctoo.core.dto.CreateCollection)30 TestGraphBuilder.newGraph (nl.knaw.huygens.timbuctoo.util.TestGraphBuilder.newGraph)30 Direction (org.apache.tinkerpop.gremlin.structure.Direction)30 Graph (org.apache.tinkerpop.gremlin.structure.Graph)30 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)30 Matchers.contains (org.hamcrest.Matchers.contains)30 Matchers.containsInAnyOrder (org.hamcrest.Matchers.containsInAnyOrder)30 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)29