protected String getModelName( Resource root ) { Literal L = getRequiredLiteral( root, JA.modelName ); return L.getLexicalForm(); } }
@Override protected void consumeLiteral(FailureMessageBuilder builder, Literal literal) { builder.withDetail(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(BrokerBuilder builder, Literal literal) { builder.withPort(literal.getLexicalForm()); } }
private static String getEncoding( Resource root ) { Literal L = getUniqueLiteral( root, JA.contentEncoding ); return L == null ? null : L.getLexicalForm(); }
@Override protected void consumeLiteral(FailureMessageBuilder builder, Literal literal) { builder.withReason(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(FailureMessageBuilder builder, Literal literal) { builder.withCode(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(BrokerBuilder builder, Literal literal) { builder.withVirtualHost(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(BrokerBuilder builder, Literal literal) { builder.withHost(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(final DeliveryChannelBuilder builder, final Literal literal) { builder.withRoutingKey(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(FailureMessageBuilder builder, Literal literal) { builder.withSubcode(literal.getLexicalForm()); } }
@Override protected void consumeLiteral(final DeliveryChannelBuilder builder, final Literal literal) { builder.withExchangeName(literal.getLexicalForm()); } }
private static void setSimplePrefixes( Resource root, PrefixMapping result ) { if (root.hasProperty( JA.prefix )) { Literal prefix = getUniqueLiteral( root, JA.prefix ); Literal namespace = getUniqueLiteral( root, JA.namespace ); result.setNsPrefix( prefix.getLexicalForm(), namespace.getLexicalForm() ); } } }
public List<String> getTitles() { List<String> titles = new ArrayList<String>(); StmtIterator itr = res.listProperties(DC.title); while (itr.hasNext()) { Statement statement = itr.nextStatement(); String title = ((Literal) statement.getObject()).getLexicalForm(); titles.add(title); } return titles; }
@Override protected void processSolution() { this.builder.add(literal("update").getLexicalForm().toString()); } @Override
@Override protected void processSolution() { this.resolution=literal("roundtrip").getLexicalForm().toString(); } @Override
private Literal rename( Literal n ) { String typeURI = n.getDatatypeURI(); if (typeURI == null) return n; String newURI = pe.rename( typeURI ); if (typeURI == newURI) return n; return ResourceFactory.createTypedLiteral( n.getLexicalForm(), typeNamed(newURI) ); }
/** * Answer the string value of the parameter if set, or null otherwise. Note command line * has precedence. * * @return String */ protected String getStringValue( List<String> cmdLineArgs, Resource confRoot ) { RDFNode n = getValue( cmdLineArgs, confRoot ); return (n == null) ? null : (n.isLiteral() ? n.asLiteral().getLexicalForm() : n.toString() ); }
protected Set<Couple<String, Resource>> allFiltersOf( Set<Couple<String, Resource>> them, Resource sel) { for (RDFNode p: sel.listProperties( API.parent ).mapWith( Statement.Util.getObject ).toList()) { allFiltersOf( them, (Resource) p ); } for (RDFNode f: sel.listProperties( API.filter ).mapWith( Statement.Util.getObject).toList()) { String pvs = ((Literal) f).getLexicalForm(); for (String filter: pvs.split( "&" )) them.add( new Couple<String, Resource>( filter, sel ) ); } return them; }
private static String toString(RDFNode v) { if( v.isLiteral() ) return ((Literal) v).getLexicalForm(); else if( v.isAnon() ) return ANON_URI + v.asNode().getBlankNodeLabel(); else return ((Resource) v).getURI(); }
private String asBody( RDFNode n ) { if (n.isLiteral()) return n.asLiteral().getLexicalForm(); if (n.isResource()) return n.asResource().getURI(); return n.toString(); }