Search in sources :

Example 6 with AtlasElement

use of org.apache.atlas.repository.graphdb.AtlasElement in project atlas by apache.

the class AtlasJanusElement method setPropertyFromElementsIds.

@Override
public void setPropertyFromElementsIds(String propertyName, List<AtlasElement> values) {
    List<String> propertyValue = new ArrayList<>(values.size());
    for (AtlasElement value : values) {
        propertyValue.add(value.getId().toString());
    }
    setProperty(propertyName, propertyValue);
}
Also used : ArrayList(java.util.ArrayList) AtlasElement(org.apache.atlas.repository.graphdb.AtlasElement)

Example 7 with AtlasElement

use of org.apache.atlas.repository.graphdb.AtlasElement in project atlas by apache.

the class Titan0Element method setPropertyFromElementsIds.

@Override
public void setPropertyFromElementsIds(String propertyName, List<AtlasElement> values) {
    List<String> propertyValue = new ArrayList<>(values.size());
    for (AtlasElement element : values) {
        propertyValue.add(element.getId().toString());
    }
    setProperty(propertyName, propertyValue);
}
Also used : ArrayList(java.util.ArrayList) AtlasElement(org.apache.atlas.repository.graphdb.AtlasElement) Override(java.lang.Override)

Example 8 with AtlasElement

use of org.apache.atlas.repository.graphdb.AtlasElement in project incubator-atlas by apache.

the class Titan1Element method setPropertyFromElementsIds.

@Override
public void setPropertyFromElementsIds(String propertyName, List<AtlasElement> values) {
    List<String> propertyValue = new ArrayList<>(values.size());
    for (AtlasElement value : values) {
        propertyValue.add(value.getId().toString());
    }
    setProperty(propertyName, propertyValue);
}
Also used : ArrayList(java.util.ArrayList) AtlasElement(org.apache.atlas.repository.graphdb.AtlasElement)

Aggregations

AtlasElement (org.apache.atlas.repository.graphdb.AtlasElement)8 ArrayList (java.util.ArrayList)6 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 Override (java.lang.Override)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 AtlasGraphQuery (org.apache.atlas.repository.graphdb.AtlasGraphQuery)2 JSONObject (org.codehaus.jettison.json.JSONObject)2 EntityNotFoundException (org.apache.atlas.exception.EntityNotFoundException)1 EntityNotFoundException (org.apache.atlas.typesystem.exception.EntityNotFoundException)1