Java Code Examples for org.eclipse.rdf4j.model.ValueFactory#createLiteral()

The following examples show how to use org.eclipse.rdf4j.model.ValueFactory#createLiteral() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConvertSpinRDFToString.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length < 1 || args.length > 2) {
		throw new ValueExprEvaluationException("Incorrect number of arguments");
	}
	if (!(args[0] instanceof Resource)) {
		throw new ValueExprEvaluationException("First argument must be the root of a SPIN RDF query");
	}
	if (args.length == 2 && !(args[1] instanceof Literal)) {
		throw new ValueExprEvaluationException("Second argument must be a string");
	}
	Resource q = (Resource) args[0];
	boolean useHtml = (args.length == 2) ? ((Literal) args[1]).booleanValue() : false;
	String sparqlString;
	try {
		ParsedOperation op = parser.parse(q, getCurrentQueryPreparer().getTripleSource());
		sparqlString = new SPARQLQueryRenderer().render((ParsedQuery) op);
	} catch (Exception e) {
		throw new ValueExprEvaluationException(e);
	}
	return valueFactory.createLiteral(sparqlString);
}
 
Example 2
Source File: GeoTemporalProviderTest.java    From rya with Apache License 2.0 6 votes vote down vote up
@Test
public void onePatternTwoFilters_test() throws Exception {
    final ValueFactory vf = SimpleValueFactory.getInstance();
    final Value geo = vf.createLiteral("Point(0 0)", GeoConstants.XMLSCHEMA_OGC_WKT);
    final Value temp = vf.createLiteral(new TemporalInstantRfc3339(2015, 12, 30, 12, 00, 0).toString());
    final IRI tempPred = vf.createIRI(URI_PROPERTY_AT_TIME);
    final String query =
        "PREFIX geo: <http://www.opengis.net/ont/geosparql#>" +
        "PREFIX geos: <http://www.opengis.net/def/function/geosparql/>" +
        "PREFIX time: <tag:rya-rdf.org,2015:temporal#>" +
        "SELECT * WHERE { " +
            "?subj <" + tempPred + "> ?time ."+
            " FILTER(geos:sfContains(?loc, " + geo + ")) . " +
            " FILTER(time:equals(?time, " + temp + ")) . " +
        "}";
    final QuerySegment<EventQueryNode> node = getQueryNode(query);
    final List<EventQueryNode> nodes = provider.getExternalSets(node);
    assertEquals(0, nodes.size());
}
 
Example 3
Source File: DecodeURL.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length < 1 || args.length > 2) {
		throw new ValueExprEvaluationException("Incorrect number of arguments");
	}
	if (!(args[0] instanceof Literal)) {
		throw new ValueExprEvaluationException("First argument must be a string");
	}
	if (args.length == 2 && !(args[1] instanceof Literal)) {
		throw new ValueExprEvaluationException("Second argument must be a string");
	}
	Literal s = (Literal) args[0];
	String encoding = (args.length == 2) ? ((Literal) args[1]).getLabel() : "UTF-8";
	try {
		return valueFactory.createLiteral(URLDecoder.decode(s.getLabel(), encoding));
	} catch (UnsupportedEncodingException e) {
		throw new ValueExprEvaluationException(e);
	}
}
 
Example 4
Source File: GeometricBinaryFunction.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length != 2) {
		throw new ValueExprEvaluationException(getURI() + " requires exactly 2 arguments, got " + args.length);
	}

	SpatialContext geoContext = SpatialSupport.getSpatialContext();
	Shape geom1 = FunctionArguments.getShape(this, args[0], geoContext);
	Shape geom2 = FunctionArguments.getShape(this, args[1], geoContext);

	String wkt;
	try {
		Shape result = operation(geom1, geom2);
		wkt = SpatialSupport.getWktWriter().toWkt(result);
	} catch (IOException | RuntimeException e) {
		throw new ValueExprEvaluationException(e);
	}
	return valueFactory.createLiteral(wkt, GEO.WKT_LITERAL);
}
 
Example 5
Source File: GeometricRelationFunction.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length != 2) {
		throw new ValueExprEvaluationException(getURI() + " requires exactly 2 arguments, got " + args.length);
	}

	SpatialContext geoContext = SpatialSupport.getSpatialContext();
	Shape geom1 = FunctionArguments.getShape(this, args[0], geoContext);
	Shape geom2 = FunctionArguments.getShape(this, args[1], geoContext);
	try {
		boolean result = relation(geom1, geom2);

		return valueFactory.createLiteral(result);
	} catch (RuntimeException e) {
		throw new ValueExprEvaluationException("error evaluating geospatial relation", e);
	}
}
 
Example 6
Source File: EvaluationStrategyTest.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@Test
public void testDatetimeSubtypesStrict() {
	ValueFactory vf = strictRepo.getValueFactory();

	try (RepositoryConnection conn = strictRepo.getConnection()) {
		Literal l1 = vf.createLiteral("2009", XMLSchema.GYEAR);
		Literal l2 = vf.createLiteral("2009-01", XMLSchema.GYEARMONTH);
		IRI s1 = vf.createIRI("urn:s1");
		IRI s2 = vf.createIRI("urn:s2");
		conn.add(s1, RDFS.LABEL, l1);
		conn.add(s2, RDFS.LABEL, l2);

		String query = "SELECT * WHERE { ?s rdfs:label ?l . FILTER(?l >= \"2008\"^^xsd:gYear) }";

		List<BindingSet> result = QueryResults.asList(conn.prepareTupleQuery(query).evaluate());
		assertEquals(1, result.size());
	}
}
 
Example 7
Source File: Hours.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public Literal evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length != 1) {
		throw new ValueExprEvaluationException("HOURS requires 1 argument, got " + args.length);
	}

	Value argValue = args[0];
	if (argValue instanceof Literal) {
		Literal literal = (Literal) argValue;

		IRI datatype = literal.getDatatype();

		if (datatype != null && XMLDatatypeUtil.isCalendarDatatype(datatype)) {
			try {
				XMLGregorianCalendar calValue = literal.calendarValue();

				int hours = calValue.getHour();
				if (DatatypeConstants.FIELD_UNDEFINED != hours) {
					return valueFactory.createLiteral(String.valueOf(hours), XMLSchema.INTEGER);
				} else {
					throw new ValueExprEvaluationException("can not determine hours from value: " + argValue);
				}
			} catch (IllegalArgumentException e) {
				throw new ValueExprEvaluationException("illegal calendar value: " + argValue);
			}
		} else {
			throw new ValueExprEvaluationException("unexpected input value for function: " + argValue);
		}
	} else {
		throw new ValueExprEvaluationException("unexpected input value for function: " + args[0]);
	}
}
 
Example 8
Source File: GeoIndexerTest.java    From rya with Apache License 2.0 5 votes vote down vote up
@Test
public void testDcSearchWithSubject() throws Exception {
    // test a ring around dc
    try (final GeoMesaGeoIndexer f = new GeoMesaGeoIndexer()) {
        f.setConf(conf);

        final ValueFactory vf = SimpleValueFactory.getInstance();
        final Resource subject = vf.createIRI("foo:subj");
        final IRI predicate = GeoConstants.GEO_AS_WKT;
        final Value object = vf.createLiteral("Point(-77.03524 38.889468)", GeoConstants.XMLSCHEMA_OGC_WKT);
        final Resource context = vf.createIRI("foo:context");

        final Statement statement = vf.createStatement(subject, predicate, object, context);
        f.storeStatement(convertStatement(statement));
        f.flush();

        final double[] IN = { -78, 39, -77, 39, -77, 38, -78, 38, -78, 39 };
        final LinearRing r1 = gf.createLinearRing(new PackedCoordinateSequence.Double(IN, 2));
        final Polygon p1 = gf.createPolygon(r1, new LinearRing[] {});

        // query with correct subject
        Assert.assertEquals(Sets.newHashSet(statement), getSet(f.queryWithin(p1, new StatementConstraints().setSubject(subject))));

        // query with wrong subject
        Assert.assertEquals(Sets.newHashSet(), getSet(f.queryWithin(p1, new StatementConstraints().setSubject(vf.createIRI("foo:subj2")))));
    }
}
 
Example 9
Source File: Rand.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public Literal evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length != 0) {
		throw new ValueExprEvaluationException("RAND requires 0 arguments, got " + args.length);
	}

	Random randomGenerator = new Random();
	double randomValue = randomGenerator.nextDouble();

	return valueFactory.createLiteral(randomValue);
}
 
Example 10
Source File: NamespacesController.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private ModelAndView getExportNamespacesResult(HttpServletRequest request, HttpServletResponse response)
		throws ClientHTTPException, ServerHTTPException {
	final boolean headersOnly = METHOD_HEAD.equals(request.getMethod());

	Map<String, Object> model = new HashMap<>();
	if (!headersOnly) {
		List<String> columnNames = Arrays.asList("prefix", "namespace");
		List<BindingSet> namespaces = new ArrayList<>();

		try (RepositoryConnection repositoryCon = RepositoryInterceptor.getRepositoryConnection(request)) {
			final ValueFactory vf = repositoryCon.getValueFactory();
			try {
				try (CloseableIteration<? extends Namespace, RepositoryException> iter = repositoryCon
						.getNamespaces()) {
					while (iter.hasNext()) {
						Namespace ns = iter.next();

						Literal prefix = vf.createLiteral(ns.getPrefix());
						Literal namespace = vf.createLiteral(ns.getName());

						BindingSet bindingSet = new ListBindingSet(columnNames, prefix, namespace);
						namespaces.add(bindingSet);
					}
				}
			} catch (RepositoryException e) {
				throw new ServerHTTPException("Repository error: " + e.getMessage(), e);
			}
		}
		model.put(QueryResultView.QUERY_RESULT_KEY, new IteratingTupleQueryResult(columnNames, namespaces));
	}

	TupleQueryResultWriterFactory factory = ProtocolUtil.getAcceptableService(request, response,
			TupleQueryResultWriterRegistry.getInstance());

	model.put(QueryResultView.FILENAME_HINT_KEY, "namespaces");
	model.put(QueryResultView.HEADERS_ONLY, headersOnly);
	model.put(QueryResultView.FACTORY_KEY, factory);

	return new ModelAndView(TupleQueryResultView.getInstance(), model);
}
 
Example 11
Source File: GeoIndexerTest.java    From rya with Apache License 2.0 5 votes vote down vote up
@Test
public void testDcSearchWithSubjectAndContext() throws Exception {
    // test a ring around dc
    try (final GeoMesaGeoIndexer f = new GeoMesaGeoIndexer()) {
        f.setConf(conf);

        final ValueFactory vf = SimpleValueFactory.getInstance();
        final Resource subject = vf.createIRI("foo:subj");
        final IRI predicate = GeoConstants.GEO_AS_WKT;
        final Value object = vf.createLiteral("Point(-77.03524 38.889468)", GeoConstants.XMLSCHEMA_OGC_WKT);
        final Resource context = vf.createIRI("foo:context");

        final Statement statement = vf.createStatement(subject, predicate, object, context);
        f.storeStatement(convertStatement(statement));
        f.flush();

        final double[] IN = { -78, 39, -77, 39, -77, 38, -78, 38, -78, 39 };
        final LinearRing r1 = gf.createLinearRing(new PackedCoordinateSequence.Double(IN, 2));
        final Polygon p1 = gf.createPolygon(r1, new LinearRing[] {});

        // query with correct context subject
        Assert.assertEquals(Sets.newHashSet(statement),
                getSet(f.queryWithin(p1, new StatementConstraints().setContext(context).setSubject(subject))));

        // query with wrong context
        Assert.assertEquals(Sets.newHashSet(),
                getSet(f.queryWithin(p1, new StatementConstraints().setContext(vf.createIRI("foo:context2")))));

        // query with wrong subject
        Assert.assertEquals(Sets.newHashSet(), getSet(f.queryWithin(p1, new StatementConstraints().setSubject(vf.createIRI("foo:subj2")))));
    }
}
 
Example 12
Source File: QueryIT.java    From rya with Apache License 2.0 5 votes vote down vote up
@Test
public void dateTimeWithinNow() throws Exception {

    final ValueFactory vf = SimpleValueFactory.getInstance();
    final DatatypeFactory dtf = DatatypeFactory.newInstance();
    FunctionRegistry.getInstance().add(new DateTimeWithinPeriod());

    final String sparql = "PREFIX fn: <" + FN.NAMESPACE +">"
            + "SELECT ?event ?startTime WHERE { ?event <uri:startTime> ?startTime. "
            + "FILTER(fn:dateTimeWithin(?startTime, NOW(), 30, <" + OWLTime.SECONDS_URI + "> ))}";

    final ZonedDateTime zTime = ZonedDateTime.now();
    final String time = zTime.format(DateTimeFormatter.ISO_INSTANT);

    final ZonedDateTime zTime1 = zTime.minusSeconds(30);
    final String time1 = zTime1.format(DateTimeFormatter.ISO_INSTANT);

    final Literal lit = vf.createLiteral(dtf.newXMLGregorianCalendar(time));
    final Literal lit1 = vf.createLiteral(dtf.newXMLGregorianCalendar(time1));

    // Create the Statements that will be loaded into Rya.
    final Collection<Statement> statements = Sets.newHashSet(
            vf.createStatement(vf.createIRI("uri:event1"), vf.createIRI("uri:startTime"), lit),
            vf.createStatement(vf.createIRI("uri:event2"), vf.createIRI("uri:startTime"), lit1)
           );

    // Create the expected results of the SPARQL query once the PCJ has been computed.
    final Set<BindingSet> expectedResults = new HashSet<>();

    final MapBindingSet bs = new MapBindingSet();
    bs.addBinding("event", vf.createIRI("uri:event1"));
    bs.addBinding("startTime", lit);
    expectedResults.add(bs);

    // Verify the end results of the query match the expected results.
    runTest(sparql, statements, expectedResults, ExportStrategy.RYA);
}
 
Example 13
Source File: Literals.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Creates a typed {@link Literal} out of the supplied object, mapping the runtime type of the object to the
 * appropriate XML Schema type. If no mapping is available, the method throws an exception if the boolean parameter
 * is true, or if it is false it returns a literal with the string representation of the supplied object as the
 * value, and {@link XMLSchema#STRING} as the datatype. Recognized types are {@link Boolean}, {@link Byte},
 * {@link Double}, {@link Float}, {@link Integer}, {@link Long}, {@link Short}, {@link XMLGregorianCalendar } , and
 * {@link Date}.
 *
 * @param valueFactory            The {@link ValueFactory} to use when creating the result.
 * @param object                  an object to be converted to a typed literal.
 * @param throwExceptionOnFailure If true throws a {@link LiteralUtilException} when the object is not recognised.
 *                                If false it returns a string typed literal based on the objects toString method.
 * @return a typed literal representation of the supplied object.
 * @throws LiteralUtilException If the literal could not be created.
 * @throws NullPointerException If the object was null.
 */
private static Literal createLiteral(ValueFactory valueFactory, Object object, boolean throwExceptionOnFailure)
		throws LiteralUtilException {
	if (object == null) {
		throw new NullPointerException("Cannot create a literal from a null");
	}

	if (object instanceof Boolean) {
		return valueFactory.createLiteral(((Boolean) object).booleanValue());
	} else if (object instanceof Byte) {
		return valueFactory.createLiteral(((Byte) object).byteValue());
	} else if (object instanceof Double) {
		return valueFactory.createLiteral(((Double) object).doubleValue());
	} else if (object instanceof Float) {
		return valueFactory.createLiteral(((Float) object).floatValue());
	} else if (object instanceof Integer) {
		return valueFactory.createLiteral(((Integer) object).intValue());
	} else if (object instanceof Long) {
		return valueFactory.createLiteral(((Long) object).longValue());
	} else if (object instanceof Short) {
		return valueFactory.createLiteral(((Short) object).shortValue());
	} else if (object instanceof XMLGregorianCalendar) {
		return valueFactory.createLiteral((XMLGregorianCalendar) object);
	} else if (object instanceof Date) {
		return valueFactory.createLiteral((Date) object);
	} else if (object instanceof String) {
		return valueFactory.createLiteral(object.toString(), XMLSchema.STRING);
	} else {
		if (throwExceptionOnFailure) {
			throw new LiteralUtilException("Did not recognise object when creating literal");
		}
		return valueFactory.createLiteral(object.toString(), XMLSchema.STRING);
	}
}
 
Example 14
Source File: GeoIndexerTest.java    From rya with Apache License 2.0 5 votes vote down vote up
@Test
public void testDcSearch() throws Exception {
    // test a ring around dc
    try (final GeoMesaGeoIndexer f = new GeoMesaGeoIndexer()) {
        f.setConf(conf);

        final ValueFactory vf = SimpleValueFactory.getInstance();
        final Resource subject = vf.createIRI("foo:subj");
        final IRI predicate = GeoConstants.GEO_AS_WKT;
        final Value object = vf.createLiteral("Point(-77.03524 38.889468)", GeoConstants.XMLSCHEMA_OGC_WKT);
        final Resource context = vf.createIRI("foo:context");

        final Statement statement = vf.createStatement(subject, predicate, object, context);
        f.storeStatement(convertStatement(statement));
        f.flush();

        final double[] IN = { -78, 39, -77, 39, -77, 38, -78, 38, -78, 39 };
        final LinearRing r1 = gf.createLinearRing(new PackedCoordinateSequence.Double(IN, 2));
        final Polygon p1 = gf.createPolygon(r1, new LinearRing[] {});
        Assert.assertEquals(Sets.newHashSet(statement), getSet(f.queryWithin(p1, EMPTY_CONSTRAINTS)));

        // test a ring outside the point
        final double[] OUT = { -77, 39, -76, 39, -76, 38, -77, 38, -77, 39 };
        final LinearRing rOut = gf.createLinearRing(new PackedCoordinateSequence.Double(OUT, 2));
        final Polygon pOut = gf.createPolygon(rOut, new LinearRing[] {});
        Assert.assertEquals(Sets.newHashSet(), getSet(f.queryWithin(pOut, EMPTY_CONSTRAINTS)));
    }
}
 
Example 15
Source File: Minutes.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public Literal evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	if (args.length != 1) {
		throw new ValueExprEvaluationException("MINUTES requires 1 argument, got " + args.length);
	}

	Value argValue = args[0];
	if (argValue instanceof Literal) {
		Literal literal = (Literal) argValue;

		IRI datatype = literal.getDatatype();

		if (datatype != null && XMLDatatypeUtil.isCalendarDatatype(datatype)) {
			try {
				XMLGregorianCalendar calValue = literal.calendarValue();

				int minutes = calValue.getMinute();
				if (DatatypeConstants.FIELD_UNDEFINED != minutes) {
					return valueFactory.createLiteral(String.valueOf(minutes), XMLSchema.INTEGER);
				} else {
					throw new ValueExprEvaluationException("can not determine minutes from value: " + argValue);
				}
			} catch (IllegalArgumentException e) {
				throw new ValueExprEvaluationException("illegal calendar value: " + argValue);
			}
		} else {
			throw new ValueExprEvaluationException("unexpected input value for function: " + argValue);
		}
	} else {
		throw new ValueExprEvaluationException("unexpected input value for function: " + args[0]);
	}
}
 
Example 16
Source File: ConversionUtil.java    From semweb4j with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static org.eclipse.rdf4j.model.Literal toRDF4J(LanguageTagLiteral literal, ValueFactory factory) {
	return literal == null ? null : factory.createLiteral(literal.getValue(), literal.getLanguageTag());
}
 
Example 17
Source File: CurrentTimeMillis.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	return valueFactory.createLiteral(System.currentTimeMillis());
}
 
Example 18
Source File: Random.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
	return valueFactory.createLiteral(Math.random());
}
 
Example 19
Source File: KBInstance.java    From inception with Apache License 2.0 4 votes vote down vote up
public void write(RepositoryConnection aConn, KnowledgeBase kb)
{
    ValueFactory vf = aConn.getValueFactory();
    IRI subject = vf.createIRI(identifier);

    originalStatements.clear();

    Statement typeStmt = vf.createStatement(subject, kb.getTypeIri(),
            vf.createIRI(type.toString()));
    originalStatements.add(typeStmt);
    aConn.add(typeStmt);

    if (isNotBlank(name)) {
        Literal nameLiteral;
        if (language != null) {
            nameLiteral = vf.createLiteral(name, language);
        }
        else if (kb.getDefaultLanguage() != null) {
            nameLiteral = vf.createLiteral(name, kb.getDefaultLanguage());
        }
        else {
            nameLiteral = vf.createLiteral(name);
        }
        Statement nameStmt = vf.createStatement(subject, kb.getLabelIri(), nameLiteral);
        originalStatements.add(nameStmt);
        aConn.add(nameStmt);
    }

    if (isNotBlank(description)) {
        Literal descriptionLiteral;
        if (language == null) {
            descriptionLiteral = vf.createLiteral(description);
        }
        else {
            descriptionLiteral = vf.createLiteral(description, language);
        }
        Statement descStmt = vf
            .createStatement(subject, kb.getDescriptionIri(), descriptionLiteral);
        originalStatements.add(descStmt);
        aConn.add(descStmt);
    }
}
 
Example 20
Source File: KBConcept.java    From inception with Apache License 2.0 4 votes vote down vote up
public void write(RepositoryConnection aConn, KnowledgeBase kb)
{
    ValueFactory vf = aConn.getValueFactory();
    IRI subject = vf.createIRI(identifier);

    originalStatements.clear();

    Statement typeStmt = vf.createStatement(subject, kb.getTypeIri(), kb.getClassIri());
    originalStatements.add(typeStmt);
    aConn.add(typeStmt);

    if (isNotBlank(name)) {
        Literal nameLiteral;
        if (language != null) {
            nameLiteral = vf.createLiteral(name, language);
        }
        else if (kb.getDefaultLanguage() != null) {
            nameLiteral = vf.createLiteral(name, kb.getDefaultLanguage());
        }
        else {
            nameLiteral = vf.createLiteral(name);
        }
        Statement nameStmt = vf.createStatement(subject, kb.getLabelIri(), nameLiteral);
        originalStatements.add(nameStmt);
        aConn.add(nameStmt);
    }
    if (isNotBlank(description)) {
        Literal descriptionLiteral;
        if (language == null) {
            descriptionLiteral = vf.createLiteral(description);
        }
        else {
            descriptionLiteral = vf.createLiteral(description, language);
        }
        Statement descStmt = vf
            .createStatement(subject, kb.getDescriptionIri(), descriptionLiteral);
        originalStatements.add(descStmt);
        aConn.add(descStmt);
    }

    /* Commented out until the functionality which uses them is actually implemented
    Statement closedStmt = vf.createStatement(subject, CLOSED, vf.createLiteral(closed));
    originalStatements.add(closedStmt);
    aConn.add(closedStmt);

    Statement abstractStmt = vf
        .createStatement(subject, ABSTRACT, vf.createLiteral(abstractClass));
    originalStatements.add(abstractStmt);
    aConn.add(abstractStmt);
    */
}