@Override public TestProperty aProperty() { if (!isSubject()) throw new IllegalStateException("Node is not the subject of a triple."); return enhGraph.getNodeAs(findSubject().getPredicate(),TestProperty.class); }
@Override public TestSubject aSubject() { if (!isObject()) throw new IllegalStateException("Node is not the object of a triple."); return enhGraph.getNodeAs(findObject().getSubject(),TestSubject.class); }
@Override public TestObject anObject() { if (!isProperty()) throw new IllegalStateException("Node is not the property of a triple."); return enhGraph.getNodeAs(findPredicate().getObject(),TestObject.class); }
@Override public TestProperty aProperty() { if (!isSubject()) throw new IllegalStateException("Node is not the subject of a triple."); return enhGraph.getNodeAs(findSubject().getPredicate(),TestProperty.class); }
@Override public TestObject anObject() { if (!isProperty()) throw new IllegalStateException("Node is not the property of a triple."); return enhGraph.getNodeAs(findPredicate().getObject(),TestObject.class); }
@Override public TestProperty aProperty() { if (!isSubject()) throw new IllegalStateException("Node is not the subject of a triple."); return enhGraph.getNodeAs(findSubject().getPredicate(),TestProperty.class); } }
@Override public TestObject anObject() { if (!isProperty()) throw new IllegalStateException("Node is not the property of a triple."); return enhGraph.getNodeAs(findPredicate().getObject(),TestObject.class); }
@Override public TestObject anObject() { if (!isProperty()) throw new IllegalStateException("Node is not the property of a triple."); return enhGraph.getNodeAs(findPredicate().getObject(),TestObject.class); }
@Override public TestProperty aProperty() { if (!isSubject()) throw new IllegalStateException("Node is not the subject of a triple."); return enhGraph.getNodeAs(findSubject().getPredicate(),TestProperty.class); } }
@Override public TestSubject aSubject() { if (!isObject()) throw new IllegalStateException("Node is not the object of a triple."); return enhGraph.getNodeAs(findObject().getSubject(),TestSubject.class); }
/** * The code first checks that the interface is appropriate at this point. * This is not obligatory but should be considered. * (If the underlying graph has changed for the worse will * users prefer an early and unambiguous exception at this point). * * @see org.apache.jena.enhanced.test.TestObject#aSubject() */ @Override public TestSubject aSubject() { if (!isObject()) throw new IllegalStateException("Node is not the object of a triple."); return enhGraph.getNodeAs(findObject().getSubject(),TestSubject.class); } }
/** * The code first checks that the interface is appropriate at this point. * This is not obligatory but should be considered. * (If the underlying graph has changed for the worse will * users prefer an early and unambiguous exception at this point). * * @see org.apache.jena.enhanced.test.TestObject#aSubject() */ @Override public TestSubject aSubject() { if (!isObject()) throw new IllegalStateException("Node is not the object of a triple."); return enhGraph.getNodeAs(findObject().getSubject(),TestSubject.class); } }