private static String getIncomingProperty( Resource r ) { String incomings = "", prefix = ""; StmtIterator it = r.getModel().listStatements( null, null, r ); while (it.hasNext()) { Statement s = it.nextStatement(); incomings += prefix + nice( s.getPredicate() ) + " of " + nice( s.getSubject() ); prefix = ", "; } return incomings.equals( "" ) ? "" : " [" + incomings + "]"; }
private static String getIncomingProperty( Resource r ) { String incomings = "", prefix = ""; StmtIterator it = r.getModel().listStatements( null, null, r ); while (it.hasNext()) { Statement s = it.nextStatement(); incomings += prefix + nice( s.getPredicate() ) + " of " + nice( s.getSubject() ); prefix = ", "; } return incomings.equals( "" ) ? "" : " [" + incomings + "]"; }
protected static String nice( RDFNode r ) { return r.isLiteral() ? r.asNode().toString(): nice( (Resource) r ); }
protected static String nice( RDFNode r ) { return r.isLiteral() ? r.asNode().toString(): nice( (Resource) r ); }