/** * Add a "defines" statement for the given sDef for each abstract method it * defines. */ private void addMethodDefTriples(URIReference objURI, DOReader reader, Set<Triple> set) throws ResourceIndexException { try { for (MethodDef element : getAbstractMethods(reader)) { add(objURI, MODEL.DEFINES_METHOD, element.methodName, set); } } catch (ResourceIndexException e) { throw e; } catch (Exception e) { throw new ResourceIndexException("Error adding method def " + "triples", e); } }
/** * {@inheritDoc} */ public Set<Triple> getTriplesForObject(DOReader reader) throws ResourceIndexException { Set<Triple> set = new HashSet<Triple>(); try { URIReference objURI = new SimpleURIReference( new URI(PID.toURI(reader.GetObjectPID()))); /* Now add the SDef operation-specific triples */ addMethodDefTriples(objURI, reader, set); } catch (Exception e) { throw new ResourceIndexException("Could not generate triples", e); } return set; }
/** * {@inheritDoc} */ public Set<Triple> getTriplesForObject(DOReader reader) throws ResourceIndexException { Set<Triple> set = new HashSet<Triple>(); try { URIReference objURI = new SimpleURIReference( new URI(PID.toURI(reader.GetObjectPID()))); /* Now add the SDef operation-specific triples */ addMethodDefTriples(objURI, reader, set); } catch (Exception e) { throw new ResourceIndexException("Could not generate triples", e); } return set; }
/** * Add a "defines" statement for the given sDef for each abstract method it * defines. */ private void addMethodDefTriples(URIReference objURI, DOReader reader, Set<Triple> set) throws ResourceIndexException { try { for (MethodDef element : getAbstractMethods(reader)) { add(objURI, MODEL.DEFINES_METHOD, element.methodName, set); } } catch (ResourceIndexException e) { throw e; } catch (Exception e) { throw new ResourceIndexException("Error adding method def " + "triples", e); } }