/** * {@inheritDoc} */ @Override public String shortForm(String uri) { return super.object.shortForm(uri); }
public String shortForm(String uri) { return model.shortForm(uri); }
final Model m = // TODO final String shortForm = m.shortForm(winery.asResource().getURI());
public static String fmtURI(Resource r) { return r.getModel().shortForm(r.getURI()) ; }
public static String fmtURI(Resource r) { return r.getModel().shortForm(r.getURI()) ; }
if (stmt.getPredicate().getURI().equals(Uris.RR_CLASS_URI)) { if (stmt.getObject().isURIResource()) { String shortForm = model.shortForm(stmt.getObject().toString()); String fullURI = stmt.getObject().toString(); if (!shortForm.equals(fullURI)) { Statement s = node.asResource().getProperty(dataTypeProp); if (s != null) { dataType = model.shortForm(s.getObject().toString()); String shortForm = model.shortForm(stmt.getObject().toString()); String fullURI = stmt.getObject().toString(); if (!shortForm.equals(fullURI)) {
/** * Determine an appropriate name for a property resource, creating a new * context entry if required. */ private String findNameForProperty(Resource r) { String uri = r.getURI(); String name = getNameForURI( uri ); if (name == null) { // Try just using localname String localname = r.getLocalName(); if ( nameUpdateOK(localname, uri) ) return localname; // See if we can generate a prefix form name = r.getModel().shortForm(uri); if (! name.equals(uri)) { name = name.replace(':', '_'); if ( nameUpdateOK(name, uri) ) return name; } // Start making ones up as a last resort while (true) { name = localname + nameCount++; if ( nameUpdateOK(name, uri) ) return name; } } else { return name; } }
Resource root = se.getRoot(); PrefixMapping pm = se.getSpec().getPrefixMap(); String shortName = root.getModel().shortForm( root.getURI() ); String label = getLabelled( root, shortName );
@Test public void testTermbindsIncludesMetaproperties() throws URISyntaxException { Integer totalResults = null; Resource thisMetaPage = createMetadata(false, totalResults); for (Property p: expectedTermboundProperties) { Model model = thisMetaPage.getModel(); if (!model.contains(null, API.property, p)) { fail("term bindings should include " + model.shortForm(p.getURI())); } } }