One way of finding all the property is by key name. so on vertex 'v' you
can call
v.getPropertyKeys which will return all keys of that class. Which may be
efficient too because you have access to that vertex already. Same I
believe you can do edges too that also extends Element class where this
method is defined.
On Saturday, August 30, 2014 10:03:44 AM UTC+1, Curtis Mosters wrote:
>
> Well checking if a class exists is really easy
>
> OrientGraphNoTx noTxGraph = factoryGraph.getNoTx();
> OSchema schema = db.getMetadata().getSchema();
> if (!schema.existsClass(className)) {
> noTxGraph.createVertexType(className);
> }
>
>
>
> but I cannot find a ways to check this on a property. The only way is with
> searching for the class, saving it, and than go through all the property
> and match it with the searched property.
>
> Is there a ways to do this much easier, like with the Schema above?
>
> And for sure I just can put a try catch but I don't an exception thrown,
> because it's easy to avoid.
>
> Thank you.
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.