public static DataServiceStatus status(Resource r) { if ( FusekiVocab.stateActive.equals(r) ) return ACTIVE ; if ( FusekiVocab.stateOffline.equals(r) ) return OFFLINE ; if ( FusekiVocab.stateClosing.equals(r) ) return CLOSING ; if ( FusekiVocab.stateClosed.equals(r) ) return CLOSED ; return null ; } }
private static boolean hasNoCompetingSubclass( List<RDFNode> types, Resource candidate ) { for ( RDFNode type : types ) { Resource other = (Resource) type; if ( other.hasProperty( RDFS.subClassOf, candidate ) && !candidate.equals( other ) ) { return false; } } return true; }
private static boolean hasNoCompetingSubclass( List<RDFNode> types, Resource candidate ) { for ( RDFNode type : types ) { Resource other = (Resource) type; if ( other.hasProperty( RDFS.subClassOf, candidate ) && !candidate.equals( other ) ) { return false; } } return true; }
@Override protected void blockRule( Resource r ) { if (r.equals( RDFSyntax.parseTypeLiteralPropertyElt )) { // System.err.println("Blocking"); blockLiterals = true; } else logger.warn("Cannot block rule <"+r.getURI()+">"); }
/** sameAs - is this statement equal to the statement o? We can't assume o is a StatementImpl */ private final boolean sameAs( Statement o ) { return subject.equals( o.getSubject() ) && predicate.equals( o.getPredicate() ) && object.equals( o.getObject() ); }
@Override protected void blockRule( Resource r ) { if (r.equals( RDFSyntax.parseTypeLiteralPropertyElt )) { // System.err.println("Blocking"); blockLiterals = true; } else logger.warn("Cannot block rule <"+r.getURI()+">"); }
/** sameAs - is this statement equal to the statement o? We can't assume o is a StatementImpl */ private final boolean sameAs( Statement o ) { return subject.equals( o.getSubject() ) && predicate.equals( o.getPredicate() ) && object.equals( o.getObject() ); }
/** Register an addition assembler */ static public void register(AssemblerGroup g, Resource r, Assembler a, Resource superType) { registerAssembler(g, r, a) ; if ( superType != null && ! superType.equals(r) ) { // This is called during Jena-wide initialization. // Use function for constant (JENA-1294) modelExtras.add(r, RDFS.Init.subClassOf(), superType) ; } }
String create(Property p) { Resource file = testID.getRequiredProperty(p).getResource(); Resource t = file.getRequiredProperty(RDF.type).getResource(); if (ntriple.equals(t)) { return "\"" + file.getURI() + "\",false"; } else if (rdfxml.equals(t)) { return "\"" + file.getURI() + "\",true"; } else { return "Unrecognized file type: " + t; } } Model read(Property p) throws IOException {
String create(Property p) { Resource file = testID.getRequiredProperty(p).getResource(); Resource t = file.getRequiredProperty(RDF.type).getResource(); if (ntriple.equals(t)) { return "\"" + file.getURI() + "\",false"; } else if (rdfxml.equals(t)) { return "\"" + file.getURI() + "\",true"; } else { return "Unrecognized file type: " + t; } } Model read(Property p) throws IOException {
public void testCreateStatement() { final Resource s = ResourceFactory.createResource(); final Property p = ResourceFactory .createProperty(TestResourceFactory.uri2); final Resource o = ResourceFactory.createResource(); final Statement stmt = ResourceFactory.createStatement(s, p, o); Assert.assertTrue(stmt.getSubject().equals(s)); Assert.assertTrue(stmt.getPredicate().equals(p)); Assert.assertTrue(stmt.getObject().equals(o)); }
public void testCreateStatement() { final Resource s = ResourceFactory.createResource(); final Property p = ResourceFactory .createProperty(TestResourceFactory.uri2); final Resource o = ResourceFactory.createResource(); final Statement stmt = ResourceFactory.createStatement(s, p, o); Assert.assertTrue(stmt.getSubject().equals(s)); Assert.assertTrue(stmt.getPredicate().equals(p)); Assert.assertTrue(stmt.getObject().equals(o)); }
public void testCreateResource() { Resource r1 = ResourceFactory.createResource(); Assert.assertTrue(r1.isAnon()); final Resource r2 = ResourceFactory.createResource(); Assert.assertTrue(r2.isAnon()); Assert.assertTrue(!r1.equals(r2)); r1 = ResourceFactory.createResource(TestResourceFactory.uri1); Assert.assertTrue(r1.getURI().equals(TestResourceFactory.uri1)); }
public void testCreateResource() { Resource r1 = ResourceFactory.createResource(); Assert.assertTrue(r1.isAnon()); final Resource r2 = ResourceFactory.createResource(); Assert.assertTrue(r2.isAnon()); Assert.assertTrue(!r1.equals(r2)); r1 = ResourceFactory.createResource(TestResourceFactory.uri1); Assert.assertTrue(r1.getURI().equals(TestResourceFactory.uri1)); }
public void testGetInstance() { ResourceFactory.getInstance(); final Resource r1 = ResourceFactory.createResource(); Assert.assertTrue(r1.isAnon()); final Resource r2 = ResourceFactory.createResource(); Assert.assertTrue(r2.isAnon()); Assert.assertTrue(!r1.equals(r2)); }
public void testGetInstance() { ResourceFactory.getInstance(); final Resource r1 = ResourceFactory.createResource(); Assert.assertTrue(r1.isAnon()); final Resource r2 = ResourceFactory.createResource(); Assert.assertTrue(r2.isAnon()); Assert.assertTrue(!r1.equals(r2)); }