protected IRIConstantImpl(IRI iri, TypeFactory typeFactory) { this.iri = iri; this.identifier = iri.hashCode(); this.type = typeFactory.getIRITermType(); }
protected URITemplatePredicateImpl(int arity, String suffix, TypeFactory typeFactory) { super(URI_PREFIX + arity + suffix, IntStream.range(0, arity) .boxed() // TODO: require strings .map(i -> typeFactory.getAbstractAtomicTermType()) .collect(ImmutableCollectors.toList())); type = typeFactory.getIRITermType(); }
public SemanticIndexViewsManager(TypeFactory typeFactory) { this.typeFactory = typeFactory; init(); // special case of COL_TYPE.OBJECT and COL_TYPE.BNODE (both are mapped to 1) colTypetoSITable = new HashMap<>(); colTypetoSITable.put(typeFactory.getBlankNodeType(), 1); colTypetoSITable.put(typeFactory.getIRITermType(), 1); // Class SITable has value 0 (skip it) for (int i = 2; i < SITableToIRI.length; i++) colTypetoSITable.put(typeFactory.getDatatype(SITableToIRI[i]), i); }
@Inject private AtomFactoryImpl(TermFactory termFactory, TypeFactory typeFactory, org.apache.commons.rdf.api.RDF rdfFactory) { this.termFactory = termFactory; this.typeFactory = typeFactory; triplePredicate = new TriplePredicateImpl(ImmutableList.of( typeFactory.getAbstractObjectRDFType(), typeFactory.getIRITermType(), typeFactory.getAbstractRDFTermType()), rdfFactory); quadPredicate = new QuadPredicateImpl(ImmutableList.of( typeFactory.getAbstractObjectRDFType(), typeFactory.getIRITermType(), typeFactory.getAbstractRDFTermType(), typeFactory.getIRITermType()), rdfFactory); }
if ((functionSymbol instanceof BNodePredicate) || (functionSymbol instanceof URITemplatePredicate)) { return Optional.of(typeFactory.getIRITermType());
private final void init() { ImmutableList<ObjectRDFType> objectTypes = ImmutableList.of(typeFactory.getIRITermType(), typeFactory.getBlankNodeType()); IRI[] datatypeIRIs = { XSD.BOOLEAN, XSD.DATETIME, XSD.DATETIMESTAMP, XSD.DECIMAL, XSD.DOUBLE, XSD.INTEGER, XSD.INT, XSD.UNSIGNED_INT, XSD.NEGATIVE_INTEGER, XSD.NON_NEGATIVE_INTEGER, XSD.POSITIVE_INTEGER, XSD.NON_POSITIVE_INTEGER, XSD.FLOAT, XSD.LONG, XSD.STRING }; for (ObjectRDFType type1 : objectTypes) { String value = type1.isBlankNode() ? "TRUE" : "FALSE"; String filter = "ISBNODE = " + value + " AND "; { String select = RDBMSSIRepositoryManager.classTable.getSELECT(filter); String insert = RDBMSSIRepositoryManager.classTable.getINSERT("?, ?, " + value); SemanticIndexViewID viewId = new SemanticIndexViewID(type1); SemanticIndexView view = new SemanticIndexView(viewId, select, insert); views.put(view.getId(), view); classViews.add(view); } for (ObjectRDFType type2 : objectTypes) { initObjectProperty(type1, type2); } for (IRI iriType2 : datatypeIRIs) { initDataProperty(type1, typeFactory.getDatatype(iriType2)); } } }