public Iterable<Vertex> getVerticesOfClass(final String iClassName, final boolean iPolymorphic) { getContext(true); return new OrientElementScanIterable<Vertex>(this, iClassName, iPolymorphic); }
public Iterable<Edge> getEdgesOfClass(final String iClassName, final boolean iPolymorphic) { getContext(true); return new OrientElementScanIterable<Edge>(this, iClassName, iPolymorphic); }
/** * Get all the Edges in Graph of a specific edges class and all sub-classes only if iPolymorphic is true. * * @param iClassName Edge class name to filter * @param iPolymorphic If true consider also iClassName Edge sub-classes * * @return Edges as Iterable */ public Iterable<Edge> getEdgesOfClass(final String iClassName, final boolean iPolymorphic) { makeActive(); final OClass cls = getRawGraph().getMetadata().getSchema().getClass(iClassName); if (cls == null) throw new IllegalArgumentException("Cannot find class '" + iClassName + "' in database schema"); if (!cls.isSubClassOf(OrientEdgeType.CLASS_NAME)) throw new IllegalArgumentException("Class '" + iClassName + "' is not an edge class"); return new OrientElementScanIterable<Edge>(this, iClassName, iPolymorphic); }
/** * Get all the Vertices in Graph of a specific vertex class and all sub-classes only if iPolymorphic is true. * * @param iClassName Vertex class name to filter * @param iPolymorphic If true consider also Vertex iClassName sub-classes * * @return Vertices as Iterable */ public Iterable<Vertex> getVerticesOfClass(final String iClassName, final boolean iPolymorphic) { makeActive(); final OClass cls = getRawGraph().getMetadata().getSchema().getClass(iClassName); if (cls == null) throw new IllegalArgumentException("Cannot find class '" + iClassName + "' in database schema"); if (!cls.isSubClassOf(OrientVertexType.CLASS_NAME)) throw new IllegalArgumentException("Class '" + iClassName + "' is not a vertex class"); return new OrientElementScanIterable<Vertex>(this, iClassName, iPolymorphic); }