Package com.thinkaurelius.titan.graphdb.relations

Examples of com.thinkaurelius.titan.graphdb.relations.RelationIdentifier



    @Override
    public TitanEdge getEdge(Object id) {
        if (id == null) throw ExceptionFactory.edgeIdCanNotBeNull();
        RelationIdentifier rid = null;

        try {
            if (id instanceof TitanEdge) rid = (RelationIdentifier) ((TitanEdge) id).getId();
            else if (id instanceof RelationIdentifier) rid = (RelationIdentifier) id;
            else if (id instanceof String) rid = RelationIdentifier.parse((String) id);
            else if (id instanceof long[]) rid = RelationIdentifier.get((long[]) id);
            else if (id instanceof int[]) rid = RelationIdentifier.get((int[]) id);
        } catch (IllegalArgumentException e) {
            return null;
        }

        if (rid != null) return rid.findEdge(this);
        else return null;
    }
View Full Code Here


    }

    private static final String element2String(TitanElement element) {
        if (element instanceof TitanVertex) return longID2Name(element.getID());
        else {
            RelationIdentifier rid = (RelationIdentifier) element.getId();
            return rid.toString();
        }
    }
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.graphdb.relations.RelationIdentifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.