Search in sources :

Example 1 with Visibility

use of org.vertexium.Visibility in project vertexium by visallo.

the class MutableProperty method update.

public void update(Property property) {
    if (property.getHiddenVisibilities() != null) {
        for (Visibility v : property.getHiddenVisibilities()) {
            addHiddenVisibility(v);
        }
    }
    setValue(property.getValue());
    setTimestamp(property.getTimestamp());
    updateMetadata(property);
}
Also used : Visibility(org.vertexium.Visibility)

Example 2 with Visibility

use of org.vertexium.Visibility in project vertexium by visallo.

the class ExistingElementMutationImplTest method testHasChangesAlterPropertyVisibility.

@Test
public void testHasChangesAlterPropertyVisibility() {
    mutation.alterPropertyVisibility("key1", "name1", new Visibility(""));
    assertTrue("should have changes", mutation.hasChanges());
}
Also used : Visibility(org.vertexium.Visibility) Test(org.junit.Test)

Example 3 with Visibility

use of org.vertexium.Visibility in project vertexium by visallo.

the class ExistingElementMutationImplTest method testHasChangesDeleteProperty.

@Test
public void testHasChangesDeleteProperty() {
    mutation.deleteProperty(new MutablePropertyImpl("key1", "name1", "value", null, null, null, new Visibility(""), FetchHints.ALL));
    assertTrue("should have changes", mutation.hasChanges());
}
Also used : MutablePropertyImpl(org.vertexium.property.MutablePropertyImpl) Visibility(org.vertexium.Visibility) Test(org.junit.Test)

Example 4 with Visibility

use of org.vertexium.Visibility in project vertexium by visallo.

the class ExistingElementMutationImplTest method testHasChangesSetPropertyMetadata.

@Test
public void testHasChangesSetPropertyMetadata() {
    mutation.setPropertyMetadata("key1", "name1", "value", new Visibility(""));
    assertTrue("should have changes", mutation.hasChanges());
}
Also used : Visibility(org.vertexium.Visibility) Test(org.junit.Test)

Example 5 with Visibility

use of org.vertexium.Visibility in project vertexium by visallo.

the class ExistingElementMutationImplTest method testHasChangesSoftDeleteProperty.

@Test
public void testHasChangesSoftDeleteProperty() {
    mutation.softDeleteProperty(new MutablePropertyImpl("key1", "name1", "value", null, null, null, new Visibility(""), FetchHints.ALL));
    assertTrue("should have changes", mutation.hasChanges());
}
Also used : MutablePropertyImpl(org.vertexium.property.MutablePropertyImpl) Visibility(org.vertexium.Visibility) Test(org.junit.Test)

Aggregations

Visibility (org.vertexium.Visibility)11 Test (org.junit.Test)6 GraphMetadataEntry (org.vertexium.GraphMetadataEntry)2 MutablePropertyImpl (org.vertexium.property.MutablePropertyImpl)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Matcher (java.util.regex.Matcher)1 Property (org.vertexium.Property)1