@Override public String NAMESPACE() { return OWL.getURI(); }
@Override public String NAMESPACE() { return OWL.getURI(); }
private boolean isBuiltInEntity(Node n) { return n.getNameSpace().equals(RDF.getURI()) || n.getNameSpace().equals(RDFS.getURI()) || n.getNameSpace().equals(OWL.getURI()); }
public void testOWL2SharesOWL1URI() { assertEquals( OWL.getURI(), OWL2.getURI() ); }
public void testOWL2SharesOWL1URI() { assertEquals( OWL.getURI(), OWL2.getURI() ); }
public void testWritesPrefixes() { OntModel om = ModelFactory.createOntologyModel(); om.setNsPrefix( "spoo", "http://spoo.spoo.com/spoo#" ); om.add( statement( om, "ping http://spoo.spoo.com/spoo#pang pilly" ) ); om.add( statement( om, "gg " + OWL.getURI() + "hh ii" ) ); StringWriter sw = new StringWriter(); om.write( sw ); String s = sw.getBuffer().toString(); assertTrue( s.indexOf( "xmlns:spoo=\"http://spoo.spoo.com/spoo#\"" ) > 0 ); assertTrue( s.indexOf( "xmlns:owl=\"" + OWL.getURI() + "\"" ) > 0 ); }
Property predicate = st.getPredicate(); if(!predicate.getURI().startsWith(RDF.getURI()) && !predicate.getURI().startsWith(RDFS.getURI()) && !predicate.getURI().startsWith(OWL.getURI())){ RDFNode object = st.getObject(); if(object.isLiteral()){
if ( !( OWL.getURI().equals( nsKey ) || RDF.getURI().equals( nsKey ) || RDFS.getURI().equals( nsKey ) ||
public void testWritesPrefixes() { OntModel om = ModelFactory.createOntologyModel(); om.setNsPrefix( "spoo", "http://spoo.spoo.com/spoo#" ); om.add( statement( om, "ping http://spoo.spoo.com/spoo#pang pilly" ) ); om.add( statement( om, "gg " + OWL.getURI() + "hh ii" ) ); StringWriter sw = new StringWriter(); om.write( sw ); String s = sw.getBuffer().toString(); assertTrue( s.indexOf( "xmlns:spoo=\"http://spoo.spoo.com/spoo#\"" ) > 0 ); assertTrue( s.indexOf( "xmlns:owl=\"" + OWL.getURI() + "\"" ) > 0 ); }
/** Answer an iterator over the individuals selected for output */ protected ExtendedIterator<? extends RDFNode> selectIndividuals() { List<Resource> candidates = new ArrayList<>(); for (StmtIterator i = m_source.listStatements( null, RDF.type, (RDFNode) null ); i.hasNext(); ) { Statement candidate = i.nextStatement(); if (candidate.getObject().isResource()) { Resource candObj = candidate.getResource(); Resource candSubj = candidate.getSubject(); // ignore RDFS and OWL builtins if (!candObj.isAnon()) { String candTypeURI = candObj.getURI(); if (candTypeURI.startsWith( RDF.getURI() ) || candTypeURI.startsWith( OWL.getURI() ) || candTypeURI.startsWith( RDFS.getURI() )) { continue; } } // note that whether candSubj is included is tested later on by {@link #filter} if (!candSubj.isAnon() && (isIncluded( candObj ) || isIncluded( candSubj )) && !candidates.contains( candSubj )) { candidates.add( candSubj ); } } } return sorted( candidates ); }
/** Answer an iterator over the individuals selected for output */ protected ExtendedIterator<? extends RDFNode> selectIndividuals() { List<Resource> candidates = new ArrayList<>(); for (StmtIterator i = m_source.listStatements( null, RDF.type, (RDFNode) null ); i.hasNext(); ) { Statement candidate = i.nextStatement(); if (candidate.getObject().isResource()) { Resource candObj = candidate.getResource(); Resource candSubj = candidate.getSubject(); // ignore RDFS and OWL builtins if (!candObj.isAnon()) { String candTypeURI = candObj.getURI(); if (candTypeURI.startsWith( RDF.getURI() ) || candTypeURI.startsWith( OWL.getURI() ) || candTypeURI.startsWith( RDFS.getURI() )) { continue; } } // note that whether candSubj is included is tested later on by {@link #filter} if (!candSubj.isAnon() && (isIncluded( candObj ) || isIncluded( candSubj )) && !candidates.contains( candSubj )) { candidates.add( candSubj ); } } } return sorted( candidates ); }
public static void init() { if ( initialized ) return ; synchronized (initLock) { if ( initialized ) { JenaSystem.logLifecycle("JenaCore.init - skip") ; return ; } initialized = true ; JenaSystem.logLifecycle("JenaCore.init - start") ; // Initialization // Touch classes with constants. // This isn't necessary but it makes it more deterministic. // These constants are reused in various places. RDF.getURI() ; RDFS.getURI() ; OWL.getURI() ; JenaSystem.logLifecycle("JenaCore.init - finish") ; } } }
public static void init() { if ( initialized ) return ; synchronized (initLock) { if ( initialized ) { JenaSystem.logLifecycle("JenaCore.init - skip") ; return ; } initialized = true ; JenaSystem.logLifecycle("JenaCore.init - start") ; // Initialization // Touch classes with constants. // This isn't necessary but it makes it more deterministic. // These constants are reused in various places. RDF.getURI() ; RDFS.getURI() ; OWL.getURI() ; JenaSystem.logLifecycle("JenaCore.init - finish") ; } } }
/** * Sets the usual default namespaces for rdf, rdfs, owl and xsd. * @param prefixMapping the Model to modify */ public static void initNamespaces(PrefixMapping prefixMapping) { ensurePrefix(prefixMapping, "rdf", RDF.getURI()); ensurePrefix(prefixMapping, "rdfs", RDFS.getURI()); ensurePrefix(prefixMapping, "owl", OWL.getURI()); ensurePrefix(prefixMapping, "xsd", XSD.getURI()); }
/** * Sets the usual default namespaces for rdf, rdfs, owl and xsd. * @param prefixMapping the Model to modify */ public static void initNamespaces(PrefixMapping prefixMapping) { ensurePrefix(prefixMapping, "rdf", RDF.getURI()); ensurePrefix(prefixMapping, "rdfs", RDFS.getURI()); ensurePrefix(prefixMapping, "owl", OWL.getURI()); ensurePrefix(prefixMapping, "xsd", XSD.getURI()); }
/** * Load built in prefixes. */ public static void init() { registerPrefix("rdf", RDF.getURI()); registerPrefix("rdfs", RDFS.getURI()); registerPrefix("drdfs", "urn:x-hp-direct-predicate:http_//www.w3.org/2000/01/rdf-schema#"); registerPrefix("owl", OWL.getURI()); registerPrefix("jr", ReasonerVocabulary.getJenaReasonerNS()); registerPrefix("rb", ReasonerVocabulary.getRBNamespace()); registerPrefix("eg", egNS); registerPrefix("xsd", XSDDatatype.XSD + "#"); }
/** * Load built in prefixes. */ public static void init() { registerPrefix("rdf", RDF.getURI()); registerPrefix("rdfs", RDFS.getURI()); registerPrefix("drdfs", "urn:x-hp-direct-predicate:http_//www.w3.org/2000/01/rdf-schema#"); registerPrefix("owl", OWL.getURI()); registerPrefix("jr", ReasonerVocabulary.getJenaReasonerNS()); registerPrefix("rb", ReasonerVocabulary.getRBNamespace()); registerPrefix("eg", egNS); registerPrefix("xsd", XSDDatatype.XSD + "#"); }
public static void addDefaultPrefixMapping(PrefixMapping pm) { pm.setNsPrefix("rdf", RDF.getURI()); pm.setNsPrefix("rdfs", RDFS.getURI()); pm.setNsPrefix("owl", OWL.getURI()); //pm.setNsPrefix("geo", "http://www.w3.org/2003/01/geo/wgs84_pos#"); pm.setNsPrefix("geom", "http://geovocab.org/geometry#"); pm.setNsPrefix("ogc", "http://www.opengis.net/ont/geosparql#"); //pm.setNsPrefix("o", "http://fp7-pp.publicdata.eu/ontology/"); pm.setNsPrefix("nominatim", "http://jsa.aksw.org/fn/nominatim/"); pm.setNsPrefix("xsd", XSD.getURI()); pm.setNsPrefix("json", jsonFn); pm.setNsPrefix("http", httpFn); pm.setNsPrefix("term", termFn); pm.setNsPrefix("tmp", tmpNs); }
public void testStandard( PrefixMapping st ) { assertEquals( RDF.getURI(), st.getNsPrefixURI( "rdf" ) ); assertEquals( RDFS.getURI(), st.getNsPrefixURI( "rdfs" ) ); assertEquals( DC_11.getURI(), st.getNsPrefixURI( "dc" ) ); assertEquals( OWL.getURI(), st.getNsPrefixURI( "owl" ) ); }
public void testStandard( PrefixMapping st ) { assertEquals( RDF.getURI(), st.getNsPrefixURI( "rdf" ) ); assertEquals( RDFS.getURI(), st.getNsPrefixURI( "rdfs" ) ); assertEquals( DC_11.getURI(), st.getNsPrefixURI( "dc" ) ); assertEquals( OWL.getURI(), st.getNsPrefixURI( "owl" ) ); }