Search in sources :

Example 56 with Collection

use of nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection in project timbuctoo by HuygensING.

the class AutocompleteServiceTest method searchRequests1000ResultsWhenTheQueryIsEmpty.

@Test
public void searchRequests1000ResultsWhenTheQueryIsEmpty() throws Exception {
    UUID id = UUID.randomUUID();
    String collectionName = "wwpersons";
    QuickSearchResult entity = QuickSearchResult.create("[TEMP] An author", id, 2);
    TimbuctooActions timbuctooActions = mock(TimbuctooActions.class);
    given(timbuctooActions.getCollectionMetadata(anyString())).willReturn(collWithCollectionName(collectionName));
    given(timbuctooActions.doQuickSearch(any(), any(), anyString(), anyInt())).willReturn(Lists.newArrayList(entity));
    AutocompleteService instance = new AutocompleteService((collection, id1, rev) -> URI.create("http://example.com/" + collection + "/" + id1 + "?rev=" + rev), timbuctooActions);
    instance.search(collectionName, Optional.empty(), Optional.empty());
    verify(timbuctooActions).doQuickSearch(any(Collection.class), any(QuickSearch.class), any(), intThat(is(1000)));
}
Also used : QuickSearchResult(nl.knaw.huygens.timbuctoo.core.dto.QuickSearchResult) TimbuctooActions(nl.knaw.huygens.timbuctoo.core.TimbuctooActions) QuickSearch(nl.knaw.huygens.timbuctoo.core.dto.QuickSearch) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) UUID(java.util.UUID) Test(org.junit.Test)

Example 57 with Collection

use of nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection in project timbuctoo by HuygensING.

the class AutocompleteService method search.

public JsonNode search(String collectionName, Optional<String> query, Optional<String> keywordType) throws InvalidCollectionException {
    final Collection collection = timbuctooActions.getCollectionMetadata(collectionName);
    int limit = query.isPresent() ? 50 : 1000;
    String queryString = query.orElse(null);
    QuickSearch quickSearch = QuickSearch.fromQueryString(queryString);
    List<QuickSearchResult> results = timbuctooActions.doQuickSearch(collection, quickSearch, keywordType.orElse(null), limit);
    return jsnA(results.stream().map(entity -> jsnO("value", jsn(entity.getIndexedValue()), "key", jsn(autoCompleteUrlFor.apply(collectionName, entity.getId(), entity.getRev()).toString()))));
}
Also used : JsonBuilder.jsnO(nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsnO) QuickSearchResult(nl.knaw.huygens.timbuctoo.core.dto.QuickSearchResult) UrlGenerator(nl.knaw.huygens.timbuctoo.crud.UrlGenerator) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection) ReadEntity(nl.knaw.huygens.timbuctoo.core.dto.ReadEntity) List(java.util.List) QuickSearch(nl.knaw.huygens.timbuctoo.core.dto.QuickSearch) InvalidCollectionException(nl.knaw.huygens.timbuctoo.crud.InvalidCollectionException) JsonBuilder.jsnA(nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsnA) TimbuctooActions(nl.knaw.huygens.timbuctoo.core.TimbuctooActions) Optional(java.util.Optional) JsonNode(com.fasterxml.jackson.databind.JsonNode) JsonBuilder.jsn(nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsn) QuickSearchResult(nl.knaw.huygens.timbuctoo.core.dto.QuickSearchResult) QuickSearch(nl.knaw.huygens.timbuctoo.core.dto.QuickSearch) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection)

Example 58 with Collection

use of nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection in project timbuctoo by HuygensING.

the class TinkerPopOperations method acceptRelation.

@Override
public UUID acceptRelation(Collection collection, CreateRelation createRelation) throws RelationNotPossibleException {
    UUID typeId = createRelation.getTypeId();
    String userId = createRelation.getCreated().getUserId();
    Instant instant = Instant.ofEpochMilli(createRelation.getCreated().getTimeStamp());
    requireCommit = true;
    RelationType descs = getRelationDescription(traversal, typeId).orElseThrow(notPossible("Relation type " + typeId + " does not exist"));
    Vertex sourceV = getEntityByFullIteration(traversal, createRelation.getSourceId()).orElseThrow(notPossible("source is not present"));
    Vertex targetV = getEntityByFullIteration(traversal, createRelation.getTargetId()).orElseThrow(notPossible("target is not present"));
    // check if the relation already exists
    final Optional<EntityRelation> existingEdgeOpt = getEntityRelation(sourceV, targetV, typeId, collection);
    if (existingEdgeOpt.isPresent()) {
        final EntityRelation existingEdge = existingEdgeOpt.get();
        if (!existingEdge.isAccepted()) {
            // if not already an active relation
            try {
                replaceRelation(collection, existingEdge.getTimId(), existingEdge.getRevision(), true, userId, instant);
            } catch (NotFoundException e) {
                LOG.error("Relation with id '{}' not found. This should not happen.", existingEdge.getTimId());
            }
        }
        return existingEdge.getTimId();
    } else {
        Collection sourceCollection = getOwnCollectionOfElement(collection.getVre(), sourceV).orElseThrow(notPossible("Source vertex is not part of the VRE of " + collection.getCollectionName()));
        Collection targetCollection = getOwnCollectionOfElement(collection.getVre(), targetV).orElseThrow(notPossible("Target vertex is not part of the VRE of " + collection.getCollectionName()));
        DirectionalRelationType desc = descs.getForDirection(sourceCollection, targetCollection).orElseThrow(notPossible("You can't have a " + descs.getOutName() + " relation from " + sourceCollection.getEntityTypeName() + " to " + targetCollection.getEntityTypeName() + " or vice versa"));
        return createRelation(sourceV, targetV, desc, userId, collection, true, instant);
    }
}
Also used : DirectionalRelationType(nl.knaw.huygens.timbuctoo.core.dto.DirectionalRelationType) Vertex(org.apache.tinkerpop.gremlin.structure.Vertex) VertexDuplicator.duplicateVertex(nl.knaw.huygens.timbuctoo.database.tinkerpop.VertexDuplicator.duplicateVertex) ImmutableEntityRelation(nl.knaw.huygens.timbuctoo.core.dto.ImmutableEntityRelation) EntityRelation(nl.knaw.huygens.timbuctoo.core.dto.EntityRelation) Instant(java.time.Instant) RelationType(nl.knaw.huygens.timbuctoo.core.dto.RelationType) DirectionalRelationType(nl.knaw.huygens.timbuctoo.core.dto.DirectionalRelationType) NotFoundException(nl.knaw.huygens.timbuctoo.core.NotFoundException) CreateCollection(nl.knaw.huygens.timbuctoo.core.dto.CreateCollection) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection) UUID(java.util.UUID)

Example 59 with Collection

use of nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection in project timbuctoo by HuygensING.

the class TinkerPopOperations method deleteEntity.

@Override
public int deleteEntity(Collection collection, UUID id, Change modified) throws NotFoundException {
    requireCommit = true;
    GraphTraversal<Vertex, Vertex> entityTraversal = entityFetcher.getEntity(traversal, id, null, collection.getCollectionName());
    if (!entityTraversal.hasNext()) {
        throw new NotFoundException();
    }
    Vertex entity = entityTraversal.next();
    String entityTypesStr = getProp(entity, "types", String.class).orElse("[]");
    boolean wasRemoved = false;
    if (entityTypesStr.contains("\"" + collection.getEntityTypeName() + "\"")) {
        try {
            ArrayNode entityTypes = arrayToEncodedArray.tinkerpopToJson(entityTypesStr);
            if (entityTypes.size() == 1) {
                entity.property("deleted", true);
                wasRemoved = true;
            } else {
                for (int i = entityTypes.size() - 1; i >= 0; i--) {
                    JsonNode val = entityTypes.get(i);
                    if (val != null && val.asText("").equals(collection.getEntityTypeName())) {
                        entityTypes.remove(i);
                        wasRemoved = true;
                    }
                }
                entity.property("types", entityTypes.toString());
            }
        } catch (IOException e) {
            LOG.error(Logmarkers.databaseInvariant, "property 'types' was not parseable: " + entityTypesStr);
        }
    } else {
        throw new NotFoundException();
    }
    int newRev = getProp(entity, "rev", Integer.class).orElse(1) + 1;
    entity.property("rev", newRev);
    entity.edges(Direction.BOTH).forEachRemaining(edge -> {
        // Skip the hasEntity and the VERSION_OF edge, which are not real relations, but system edges
        if (edge.label().equals(HAS_ENTITY_RELATION_NAME) || edge.label().equals(VERSION_OF)) {
            return;
        }
        Optional<Collection> ownEdgeCol = getOwnCollectionOfElement(collection.getVre(), edge);
        if (ownEdgeCol.isPresent()) {
            edge.property(ownEdgeCol.get().getEntityTypeName() + "_accepted", false);
        }
    });
    setModified(entity, modified);
    entity.property("pid").remove();
    Vertex duplicate = duplicateVertex(traversal, entity, indexHandler);
    if (wasRemoved) {
        listener.onRemoveFromCollection(collection, Optional.of(entity), duplicate);
    }
    return newRev;
}
Also used : Vertex(org.apache.tinkerpop.gremlin.structure.Vertex) VertexDuplicator.duplicateVertex(nl.knaw.huygens.timbuctoo.database.tinkerpop.VertexDuplicator.duplicateVertex) NotFoundException(nl.knaw.huygens.timbuctoo.core.NotFoundException) CreateCollection(nl.knaw.huygens.timbuctoo.core.dto.CreateCollection) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection) JsonNode(com.fasterxml.jackson.databind.JsonNode) ArrayNode(com.fasterxml.jackson.databind.node.ArrayNode) IOException(java.io.IOException)

Example 60 with Collection

use of nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection in project timbuctoo by HuygensING.

the class TinkerPopOperations method retrieveProperty.

@Override
public Optional<RdfReadProperty> retrieveProperty(Vre vre, String entityRdfUri, String propertyUri) {
    Optional<Vertex> entityOpt = indexHandler.findVertexInRdfIndex(vre, entityRdfUri);
    if (entityOpt.isPresent()) {
        Vertex entity = entityOpt.get();
        Iterable<Vertex> collectionOfEntity = () -> collectionsFor(entity);
        Optional<Collection> colOpt = StreamSupport.stream(collectionOfEntity.spliterator(), false).map(col -> getProp(col, COLLECTION_NAME_PROPERTY_NAME, String.class)).filter(colNameProp -> colNameProp.isPresent()).map(colNameProp -> colNameProp.get()).map(vre::getCollectionForCollectionName).filter(Optional::isPresent).map(Optional::get).findFirst();
        if (colOpt.isPresent()) {
            Collection collection = colOpt.get();
            VertexProperty<String> property = entity.property(createPropName(collection.getEntityTypeName(), propertyUri));
            if (property.isPresent()) {
                return Optional.of(new RdfReadProperty(propertyUri, property.value()));
            }
        }
    }
    return Optional.empty();
}
Also used : AlreadyUpdatedException(nl.knaw.huygens.timbuctoo.core.AlreadyUpdatedException) CreateCollection(nl.knaw.huygens.timbuctoo.core.dto.CreateCollection) RdfImportedDefaultDisplayname(nl.knaw.huygens.timbuctoo.model.properties.RdfImportedDefaultDisplayname) VRE_NAME_PROPERTY_NAME(nl.knaw.huygens.timbuctoo.model.vre.Vre.VRE_NAME_PROPERTY_NAME) EdgeManipulator.duplicateEdge(nl.knaw.huygens.timbuctoo.database.tinkerpop.EdgeManipulator.duplicateEdge) MediaType(javax.ws.rs.core.MediaType) QuickSearch(nl.knaw.huygens.timbuctoo.core.dto.QuickSearch) ReadableProperty(nl.knaw.huygens.timbuctoo.model.properties.ReadableProperty) RdfProperty(nl.knaw.huygens.timbuctoo.core.dto.rdf.RdfProperty) COLLECTION_IS_UNKNOWN_PROPERTY_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.COLLECTION_IS_UNKNOWN_PROPERTY_NAME) Map(java.util.Map) Converters.arrayToEncodedArray(nl.knaw.huygens.timbuctoo.model.properties.converters.Converters.arrayToEncodedArray) JsonNode(com.fasterxml.jackson.databind.JsonNode) DataStoreOperations(nl.knaw.huygens.timbuctoo.core.DataStoreOperations) Transaction(org.apache.tinkerpop.gremlin.structure.Transaction) HAS_ENTITY_NODE_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_ENTITY_NODE_RELATION_NAME) QuickSearchResult(nl.knaw.huygens.timbuctoo.core.dto.QuickSearchResult) RdfIndexChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.RdfIndexChangeListener) TinkerPopGraphManager(nl.knaw.huygens.timbuctoo.server.TinkerPopGraphManager) COLLECTION_NAME_PROPERTY_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.COLLECTION_NAME_PROPERTY_NAME) Logmarkers.configurationFailure(nl.knaw.huygens.timbuctoo.logging.Logmarkers.configurationFailure) Set(java.util.Set) ChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.ChangeListener) Vertex(org.apache.tinkerpop.gremlin.structure.Vertex) ImmutableValueTypeInUse(nl.knaw.huygens.timbuctoo.core.dto.rdf.ImmutableValueTypeInUse) ReadEntity(nl.knaw.huygens.timbuctoo.core.dto.ReadEntity) DATABASE_LABEL(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.DATABASE_LABEL) Element(org.apache.tinkerpop.gremlin.structure.Element) Stream(java.util.stream.Stream) Vre(nl.knaw.huygens.timbuctoo.model.vre.Vre) CreateEntity(nl.knaw.huygens.timbuctoo.core.dto.CreateEntity) GraphTraversalSource(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource) Index(org.neo4j.graphdb.index.Index) ERROR_PREFIX(nl.knaw.huygens.timbuctoo.database.tinkerpop.TinkerpopSaver.ERROR_PREFIX) LocalProperty(nl.knaw.huygens.timbuctoo.model.properties.LocalProperty) LabelP(org.apache.tinkerpop.gremlin.neo4j.process.traversal.LabelP) RAW_PROPERTY_EDGE_NAME(nl.knaw.huygens.timbuctoo.database.tinkerpop.TinkerpopSaver.RAW_PROPERTY_EDGE_NAME) CreateProperty(nl.knaw.huygens.timbuctoo.core.dto.rdf.CreateProperty) Supplier(java.util.function.Supplier) Node(org.neo4j.graphdb.Node) CreateRelation(nl.knaw.huygens.timbuctoo.core.dto.CreateRelation) Lists(com.google.common.collect.Lists) ImmutableVresDto(nl.knaw.huygens.timbuctoo.core.dto.dataset.ImmutableVresDto) PersonNames(nl.knaw.huygens.timbuctoo.model.PersonNames) HAS_ENTITY_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_ENTITY_RELATION_NAME) StreamSupport(java.util.stream.StreamSupport) PropertyDescriptorFactory(nl.knaw.huygens.timbuctoo.search.description.property.PropertyDescriptorFactory) RelationType(nl.knaw.huygens.timbuctoo.core.dto.RelationType) Logmarkers.databaseInvariant(nl.knaw.huygens.timbuctoo.logging.Logmarkers.databaseInvariant) RelationTypeService(nl.knaw.huygens.timbuctoo.relationtypes.RelationTypeService) AddLabelChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.AddLabelChangeListener) VreBuilder(nl.knaw.huygens.timbuctoo.model.vre.VreBuilder) DataStream(nl.knaw.huygens.timbuctoo.core.dto.DataStream) ImmutablePredicateInUse(nl.knaw.huygens.timbuctoo.core.dto.rdf.ImmutablePredicateInUse) IOException(java.io.IOException) T(org.apache.tinkerpop.gremlin.structure.T) HAS_NEXT_PROPERTY_RELATION_NAME(nl.knaw.huygens.timbuctoo.model.properties.ReadableProperty.HAS_NEXT_PROPERTY_RELATION_NAME) DatabaseMigrator(nl.knaw.huygens.timbuctoo.server.databasemigration.DatabaseMigrator) Direction(org.apache.tinkerpop.gremlin.structure.Direction) VertexDuplicator.duplicateVertex(nl.knaw.huygens.timbuctoo.database.tinkerpop.VertexDuplicator.duplicateVertex) CompositeChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.CompositeChangeListener) HAS_DISPLAY_NAME_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_DISPLAY_NAME_RELATION_NAME) Traversal(org.apache.tinkerpop.gremlin.process.traversal.Traversal) TinkerPopPropertyConverter(nl.knaw.huygens.timbuctoo.database.tinkerpop.conversion.TinkerPopPropertyConverter) GraphReadUtils.getProp(nl.knaw.huygens.timbuctoo.model.GraphReadUtils.getProp) Change(nl.knaw.huygens.timbuctoo.model.Change) WwDocumentDisplayNameDescriptor(nl.knaw.huygens.timbuctoo.search.description.property.WwDocumentDisplayNameDescriptor) RDFINDEX_NAME(nl.knaw.huygens.timbuctoo.rdf.Database.RDFINDEX_NAME) ImmutableEntityRelation(nl.knaw.huygens.timbuctoo.core.dto.ImmutableEntityRelation) StreamIterator.stream(nl.knaw.huygens.timbuctoo.util.StreamIterator.stream) HAS_ARCHETYPE_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_ARCHETYPE_RELATION_NAME) Graph(org.apache.tinkerpop.gremlin.structure.Graph) LoggerFactory(org.slf4j.LoggerFactory) RDF_SYNONYM_PROP(nl.knaw.huygens.timbuctoo.rdf.Database.RDF_SYNONYM_PROP) PropertyParserFactory(nl.knaw.huygens.timbuctoo.search.description.propertyparser.PropertyParserFactory) EntityRelation(nl.knaw.huygens.timbuctoo.core.dto.EntityRelation) TinkerPopToEntityMapper(nl.knaw.huygens.timbuctoo.database.tinkerpop.conversion.TinkerPopToEntityMapper) RelationNotPossibleException(nl.knaw.huygens.timbuctoo.core.RelationNotPossibleException) URI(java.net.URI) P(org.apache.tinkerpop.gremlin.process.traversal.P) Property(org.apache.tinkerpop.gremlin.structure.Property) IS_RELATION_COLLECTION_PROPERTY_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.IS_RELATION_COLLECTION_PROPERTY_NAME) CollectionHasEntityRelationChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.CollectionHasEntityRelationChangeListener) org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.has(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.has) ImmutableMap(com.google.common.collect.ImmutableMap) CollectionBuilder(nl.knaw.huygens.timbuctoo.core.dto.dataset.CollectionBuilder) EntityFinisherHelper(nl.knaw.huygens.timbuctoo.core.EntityFinisherHelper) LocationNames(nl.knaw.huygens.timbuctoo.model.LocationNames) NotFoundException(nl.knaw.huygens.timbuctoo.core.NotFoundException) UUID(java.util.UUID) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) ArrayNode(com.fasterxml.jackson.databind.node.ArrayNode) UpdateEntity(nl.knaw.huygens.timbuctoo.core.dto.UpdateEntity) List(java.util.List) DirectionalRelationType(nl.knaw.huygens.timbuctoo.core.dto.DirectionalRelationType) Optional(java.util.Optional) FulltextIndexChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.FulltextIndexChangeListener) JsonBuilder.jsnO(nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsnO) HAS_PREDICATE_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_PREDICATE_RELATION_NAME) Tuple(nl.knaw.huygens.timbuctoo.util.Tuple) HashMap(java.util.HashMap) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection) Function(java.util.function.Function) VERSION_OF(nl.knaw.huygens.timbuctoo.database.tinkerpop.VertexDuplicator.VERSION_OF) VreMetadata(nl.knaw.huygens.timbuctoo.model.vre.VreMetadata) Logmarkers(nl.knaw.huygens.timbuctoo.logging.Logmarkers) CollectionNameHelper.defaultEntityTypeName(nl.knaw.huygens.timbuctoo.core.CollectionNameHelper.defaultEntityTypeName) VertexProperty(org.apache.tinkerpop.gremlin.structure.VertexProperty) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) SAVED_MAPPING_STATE(nl.knaw.huygens.timbuctoo.database.tinkerpop.TinkerpopSaver.SAVED_MAPPING_STATE) HAS_INITIAL_PROPERTY_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_INITIAL_PROPERTY_RELATION_NAME) JsonBuilder.jsnA(nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsnA) COLLECTION_ENTITIES_LABEL(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.COLLECTION_ENTITIES_LABEL) NoSuchElementException(java.util.NoSuchElementException) JsonBuilder.jsn(nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsn) Edge(org.apache.tinkerpop.gremlin.structure.Edge) RdfReadProperty(nl.knaw.huygens.timbuctoo.core.dto.rdf.RdfReadProperty) PredicateInUse(nl.knaw.huygens.timbuctoo.core.dto.rdf.PredicateInUse) Logger(org.slf4j.Logger) TimProperty(nl.knaw.huygens.timbuctoo.core.dto.property.TimProperty) Iterator(java.util.Iterator) RAW_ITEM_EDGE_NAME(nl.knaw.huygens.timbuctoo.database.tinkerpop.TinkerpopSaver.RAW_ITEM_EDGE_NAME) ENTITY_TYPE_NAME_PROPERTY_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.ENTITY_TYPE_NAME_PROPERTY_NAME) PropertyDescriptor(nl.knaw.huygens.timbuctoo.search.description.PropertyDescriptor) org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__) TempName(nl.knaw.huygens.timbuctoo.model.TempName) Maps(com.google.common.collect.Maps) IdIndexChangeListener(nl.knaw.huygens.timbuctoo.database.tinkerpop.changelistener.IdIndexChangeListener) GraphTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal) PropertyNameHelper.createPropName(nl.knaw.huygens.timbuctoo.database.tinkerpop.PropertyNameHelper.createPropName) TIMBUCTOO_NAMESPACE(nl.knaw.huygens.timbuctoo.server.databasemigration.RelationTypeRdfUriMigration.TIMBUCTOO_NAMESPACE) Vres(nl.knaw.huygens.timbuctoo.model.vre.Vres) SystemPropertyModifier(nl.knaw.huygens.timbuctoo.rdf.SystemPropertyModifier) Collectors.toList(java.util.stream.Collectors.toList) HAS_COLLECTION_RELATION_NAME(nl.knaw.huygens.timbuctoo.model.vre.Vre.HAS_COLLECTION_RELATION_NAME) Clock(java.time.Clock) HAS_PROPERTY_RELATION_NAME(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection.HAS_PROPERTY_RELATION_NAME) RAW_COLLECTION_EDGE_NAME(nl.knaw.huygens.timbuctoo.database.tinkerpop.TinkerpopSaver.RAW_COLLECTION_EDGE_NAME) UpdateRelation(nl.knaw.huygens.timbuctoo.core.dto.UpdateRelation) Vertex(org.apache.tinkerpop.gremlin.structure.Vertex) VertexDuplicator.duplicateVertex(nl.knaw.huygens.timbuctoo.database.tinkerpop.VertexDuplicator.duplicateVertex) Optional(java.util.Optional) RdfReadProperty(nl.knaw.huygens.timbuctoo.core.dto.rdf.RdfReadProperty) CreateCollection(nl.knaw.huygens.timbuctoo.core.dto.CreateCollection) Collection(nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection)

Aggregations

Collection (nl.knaw.huygens.timbuctoo.core.dto.dataset.Collection)147 Test (org.junit.Test)122 UUID (java.util.UUID)91 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)85 TimProperty (nl.knaw.huygens.timbuctoo.core.dto.property.TimProperty)81 TinkerPopGraphManager (nl.knaw.huygens.timbuctoo.server.TinkerPopGraphManager)80 Optional (java.util.Optional)77 List (java.util.List)76 CreateCollection (nl.knaw.huygens.timbuctoo.core.dto.CreateCollection)74 Matchers.containsInAnyOrder (org.hamcrest.Matchers.containsInAnyOrder)74 Vres (nl.knaw.huygens.timbuctoo.model.vre.Vres)73 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)72 IOException (java.io.IOException)71 Vre (nl.knaw.huygens.timbuctoo.model.vre.Vre)71 JsonBuilder.jsn (nl.knaw.huygens.timbuctoo.util.JsonBuilder.jsn)71 Matchers.is (org.hamcrest.Matchers.is)71 Change (nl.knaw.huygens.timbuctoo.model.Change)70 Matchers.not (org.hamcrest.Matchers.not)70 UpdateEntity (nl.knaw.huygens.timbuctoo.core.dto.UpdateEntity)69 VertexMatcher.likeVertex (nl.knaw.huygens.timbuctoo.util.VertexMatcher.likeVertex)69