Interface OElement

All Superinterfaces:
Comparable<OIdentifiable>, Comparator<OIdentifiable>, OIdentifiable, ORecord, ORecordElement, OSerializableStream, Serializable
All Known Subinterfaces:
OEdge, OVertex
All Known Implementing Classes:
ODocument, ODocumentEmbedded, OEdgeDelegate, OEdgeDocument, OVertexDelegate, OVertexDocument, OViewDocument

public interface OElement extends ORecord
Author:
Luigi Dell'Aquila
  • Method Details

    • getPropertyNames

      Set<String> getPropertyNames()
      Returns all the names of defined properties
      Returns:
      all the names of defined properties
    • getProperty

      <RET> RET getProperty(String name)
      Gets a property given its name
      Type Parameters:
      RET -
      Parameters:
      name - the property name
      Returns:
      Returns the property value
    • hasProperty

      boolean hasProperty(String propertyName)
      Check if a property exists in the Element
      Parameters:
      propertyName -
      Returns:
      true if exists otherwise false.
    • setProperty

      void setProperty(String name, Object value)
      Sets a property value
      Parameters:
      name - the property name
      value - the property value
    • setProperty

      void setProperty(String name, Object value, OType... fieldType)
      Sets a property value
      Parameters:
      name - the property name
      value - the property value
      fieldType - Forced type (not auto-determined)
    • removeProperty

      <RET> RET removeProperty(String name)
      Remove a property
      Parameters:
      name - the property name
    • asVertex

      Optional<OVertex> asVertex()
      Returns an instance of OVertex representing current element
      Returns:
      An OVertex that represents the current element. An empty optional if the current element is not a vertex
    • asEdge

      Optional<OEdge> asEdge()
      Returns an instance of OEdge representing current element
      Returns:
      An OEdge that represents the current element. An empty optional if the current element is not an edge
    • isVertex

      boolean isVertex()
      return true if the current element is a vertex
      Returns:
      true if the current element is a vertex
    • isEdge

      boolean isEdge()
      return true if the current element is an edge
      Returns:
      true if the current element is an edge
    • getSchemaType

      Optional<OClass> getSchemaType()
      Returns the type of current element, ie the class in the schema (if any)
      Returns:
      the type of current element. An empty optional is returned if current element does not have a schema