public class PropertyUtilities extends Object
| Constructor and Description |
|---|
PropertyUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static <T> int |
addToArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T value)
Adds value to the property with name key but does not
allow duplicates or null values.
|
static <T> int |
addToArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T value,
boolean allowDuplicates) |
static <T> int |
addToArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T value,
boolean allowDuplicates,
boolean allowNullValues) |
static void |
copyJSONObjectToPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node) |
static void |
copyJSONObjectToPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
Set<String> exclusions) |
static void |
copyJSONObjectToPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
String... exclusions) |
static int |
findFirstValueInArrayProperty(org.neo4j.graphdb.Node term,
String key,
String value) |
static String |
getNodePropertiesAsString(org.neo4j.graphdb.PropertyContainer node) |
static Object |
getNonNullNodeProperty(org.neo4j.graphdb.PropertyContainer node,
String key)
Returns the property stored at key key in the specified property
container or null.
|
static boolean |
hasContradictingPropertyValue(org.neo4j.graphdb.PropertyContainer term,
String key,
Object valueToCompare)
Determines whether the property container has a value for the property
with key key and this value does not equal
valueToCompare.
|
static boolean |
hasSamePropertyValue(org.neo4j.graphdb.PropertyContainer term,
String key,
Object valueToCompare)
Checks whether the property container has the exact
valueToCompare as value for the property identified by
key.
|
static <T> void |
mergeArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T[] array)
Gets the current property values at key for the node
node and adds them all into a single Set together with
the contents of array to avoid duplicates.
|
static void |
mergeJSONObjectIntoPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
Set<String> exclusions) |
static void |
mergeJSONObjectIntoPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
String... exclusions) |
static boolean |
mergeProperties(org.neo4j.graphdb.PropertyContainer propContainer,
Object... properties) |
static void |
mergePropertyContainerIntoPropertyContainer(org.neo4j.graphdb.Node from,
org.neo4j.graphdb.Node to,
String... exclusions) |
static void |
setNonNullNodeProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
Object value)
Sets the property at property key key of node to
value, if value is not null and the property on the node not
already set.
|
static void |
setNonNullNodeProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
Object value,
Object defaultValue)
Sets the property at property key key of node to
value, if value is not null and the property on the node not
already set.
|
public static void copyJSONObjectToPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node)
throws org.neo4j.shell.util.json.JSONException
org.neo4j.shell.util.json.JSONExceptionpublic static void copyJSONObjectToPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
String... exclusions)
throws org.neo4j.shell.util.json.JSONException
org.neo4j.shell.util.json.JSONExceptionpublic static void copyJSONObjectToPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
Set<String> exclusions)
throws org.neo4j.shell.util.json.JSONException
org.neo4j.shell.util.json.JSONExceptionpublic static void mergeJSONObjectIntoPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
String... exclusions)
throws org.neo4j.shell.util.json.JSONException
org.neo4j.shell.util.json.JSONExceptionpublic static void mergeJSONObjectIntoPropertyContainer(org.neo4j.shell.util.json.JSONObject object,
org.neo4j.graphdb.PropertyContainer node,
Set<String> exclusions)
throws org.neo4j.shell.util.json.JSONException
org.neo4j.shell.util.json.JSONExceptionpublic static void mergePropertyContainerIntoPropertyContainer(org.neo4j.graphdb.Node from,
org.neo4j.graphdb.Node to,
String... exclusions)
public static <T> void mergeArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T[] array)
LinkedHashSet is used to maintain the original
order. The original values are added first. Thus, new values are appended
to the end of the new array.node - key - array - public static <T> int addToArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T value)
node - key - value - public static <T> int addToArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T value,
boolean allowDuplicates)
public static <T> int addToArrayProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
T value,
boolean allowDuplicates,
boolean allowNullValues)
public static void setNonNullNodeProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
Object value)
node - key - value - public static void setNonNullNodeProperty(org.neo4j.graphdb.PropertyContainer node,
String key,
Object value,
Object defaultValue)
node - key - value - public static Object getNonNullNodeProperty(org.neo4j.graphdb.PropertyContainer node, String key)
node - key - public static String getNodePropertiesAsString(org.neo4j.graphdb.PropertyContainer node)
public static int findFirstValueInArrayProperty(org.neo4j.graphdb.Node term,
String key,
String value)
public static boolean hasSamePropertyValue(org.neo4j.graphdb.PropertyContainer term,
String key,
Object valueToCompare)
term - key - valueToCompare - public static boolean hasContradictingPropertyValue(org.neo4j.graphdb.PropertyContainer term,
String key,
Object valueToCompare)
term - key - valueToCompare - public static boolean mergeProperties(org.neo4j.graphdb.PropertyContainer propContainer,
Object... properties)
Copyright © 2018 JULIE Lab Jena, Germany. All rights reserved.