@Override public void statement(AResource a, AResource b, ALiteral l){ /* this method is invoked exactly once * while parsing the dummy document. * The l argument is in exclusive canonical XML and * corresponds to where the lexical form has been * in the dummy document. The lexical form is valid * iff it is unchanged. */ if (status[1] || !l.isWellFormedXML()) { status[0] = true; } //throw new BrokenException("plain literal in XMLLiteral code."); status[1] = true; status[2] = l.toString().equals(lexicalForm); } @Override
@Override public void statement(AResource a, AResource b, ALiteral l){ /* this method is invoked exactly once * while parsing the dummy document. * The l argument is in exclusive canonical XML and * corresponds to where the lexical form has been * in the dummy document. The lexical form is valid * iff it is unchanged. */ if (status[1] || !l.isWellFormedXML()) { status[0] = true; } //throw new BrokenException("plain literal in XMLLiteral code."); status[1] = true; status[2] = l.toString().equals(lexicalForm); } @Override
private static Node convert(ALiteral lit) { String dtURI = lit.getDatatypeURI(); if (dtURI == null) return NodeFactory.createLiteral(lit.toString(), lit.getLang()); if (lit.isWellFormedXML()) { return NodeFactory.createLiteral(lit.toString(), null, true); } RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(dtURI); return NodeFactory.createLiteral(lit.toString(), dt); }
private static Node convert(ALiteral lit) { String dtURI = lit.getDatatypeURI(); if (dtURI == null) return NodeFactory.createLiteral(lit.toString(), lit.getLang()); if (lit.isWellFormedXML()) { return NodeFactory.createLiteral(lit.toString(), null, true); } RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(dtURI); return NodeFactory.createLiteral(lit.toString(), dt); }
private static Node convert(ALiteral lit) { String dtURI = lit.getDatatypeURI(); if (dtURI == null) return NodeFactory.createLiteral(lit.toString(), lit.getLang()); if (lit.isWellFormedXML()) { return NodeFactory.createLiteral(lit.toString(), null, true); } RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(dtURI); return NodeFactory.createLiteral(lit.toString(), dt); }