protected static URI getRDFType() { try { return new URI(RDF.type.getURI()); } catch (URISyntaxException e) { throw new RuntimeException(e); } } }
protected static URI getRDFType() { try { return new URI(RDF.type.getURI()); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
protected static URI getRDFType() { try { return new URI(RDF.type.getURI()); } catch (URISyntaxException e) { throw new RuntimeException(e); } } }
private void loadStdDefs() { put(ListPFunction.member.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listMember.class) ; put(ListPFunction.index.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listIndex.class) ; put(ListPFunction.length.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listLength.class) ; put(ListPFunction.listMember.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listMember.class) ; put(ListPFunction.listIndex.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listIndex.class) ; put(ListPFunction.listLength.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listLength.class) ; put(RDFS.member.getURI(), com.hp.hpl.jena.sparql.pfunction.library.container.class) ; } }
protected String formatProperty(Property p) { String prop = p.getURI() ; if ( this.useWellKnownPropertySymbols && wellKnownPropsMap.containsKey(prop) ) return wellKnownPropsMap.get(prop); return formatURI(prop) ; }
public FreeTextDiscoveryFunction(JsonObject discovery) { super(null); if (discovery.get("type").getAsString().equals("svc")) { type = URI.create(MSM.Service.getURI()); } else if (discovery.get("type").getAsString().equals("op")) { type = URI.create(MSM.Operation.getURI()); } else if (discovery.get("type").getAsString().equals("i")) { type = URI.create(MSM.hasInput.getURI()); } else if (discovery.get("type").getAsString().equals("o")) { type = URI.create(MSM.hasOutput.getURI()); } query = discovery.get("query").getAsString(); }
private void loadStdDefs() { put(ListPFunction.member.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listMember.class) ; put(ListPFunction.index.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listIndex.class) ; put(ListPFunction.length.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listLength.class) ; put(ListPFunction.listMember.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listMember.class) ; put(ListPFunction.listIndex.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listIndex.class) ; put(ListPFunction.listLength.getURI() , com.hp.hpl.jena.sparql.pfunction.library.listLength.class) ; put(RDFS.member.getURI(), com.hp.hpl.jena.sparql.pfunction.library.container.class) ; } }
/** * @return A <code>Set</code> containing URIs of properties that are predicate of any statement in the <code>Annotation</code>. */ public Set<String> getPreds() { final Set<String> preds = new HashSet<String>(); for (final Statement stat : this.listStatements()) { preds.add(stat.getPredicate().getURI()); } return preds; }
@Override public Map<URI, MatchResult> findOperationsProducingAll(Set<URI> outputTypes, MatchType matchType) { return findAll(URI.create(MSM.Operation.getURI()), URI.create(MSM.hasOutput.getURI()), outputTypes, matchType); }
@Override public Map<URI, MatchResult> findServicesConsumingSome(Set<URI> inputTypes, MatchType matchType) { return findSome(URI.create(MSM.Service.getURI()), URI.create(MSM.hasInput.getURI()), inputTypes, matchType); }
private void cachePreferredLabelPropURIs() { final List<Property> props = ( (JenaEIOntModel)eagleiOntModel ).getPrefLabelProperties(); for (final Property prop : props) { prefLabelProperties.add( EIURI.create( prop.getURI() ) ); } }
protected static RDFNode getSingularProperty(Resource r, Property p) throws IllegalArgumentException { List<Statement> stmts = r.listProperties(p).toList(); if (stmts.isEmpty()) { return null; } if (stmts.size() > 1) { throw new IllegalArgumentException("Property '" + p.getURI() + "' exists multiple times."); } return stmts.get(0).getObject(); } }
/** * @param rs * The reified statement to look for predicate. * @return The predicate uri or null if an error occurs */ protected String getReifiedStatementPredicate(final ReifiedStatement rs) { return rs.getStatement().getPredicate().getURI(); }
private Element createElement(Property p) { String uri = p.getURI(), sn = shortNameFor(p); try { return d.createElement(sn); } catch (DOMException e) { throw new EldaException ( "DOM exception involving shortname '" + sn + "' [URL " + uri + "]: " + e.getMessage() ); } }
@Override public Set<URI> apply(Set<URI> resources) { Map<URI, Object> propertyMap = nfpManager.getPropertyValueOfResources(resources, URI.create(MSM_SWAGGER.isGroundedIn.getURI()), URI.class); return Sets.filter(resources, new SwaggerServicePredicate(propertyMap)); }
protected boolean isConceptWildcard(AtomicFormula af) { return af.getPredicate().getArity() == 3 && af.getArguments().get(1).isConstant() && RDF.type.getURI().equals((((ConstantExpr)af.getArguments().get(1)).getValue().toString())) && af.getArguments().get(2).isVariable(); } protected boolean isPropertyWildcard(AtomicFormula af) {
private static StringBuffer buildSingleCollectionQueryBody() { final StringBuffer sparql = new StringBuffer(); sparql.append( getTriplePattern( getVarFragment( CELL_LINE_VAR ), getUriFragment( inCollectionProperty.getURI() ), getVarFragment( SUBJECT_VARIABLE ) ) ); sparql.append("{{"); buildAllTypeRestriction(sparql); sparql.append("}}"); sparql.append( getTriplePattern( getVarFragment( SUBJECT_VARIABLE ), getUriFragment( RDFS.label.getURI() ), getVarFragment( LABEL_VARIABLE ) ) ); sparql.append( "GRAPH ?g {" ); sparql.append( getTriplePattern( getVarFragment( SUBJECT_VARIABLE ), "a", getVarFragment( TYPE_VARIABLE ) ) ); sparql.append( "} FILTER (?g != <"+ EIREPO.inferredGraph.getURI() + ">) ." ); return sparql; }
private static StringBuffer buildMandatoryResultsFragment() { final StringBuffer fragment = new StringBuffer(); fragment.append( getTriplePattern( getVarFragment( CELL_LINE_VAR ), getUriFragment( RDFS.label.getURI() ), getVarFragment( CELL_LINE_VAR + LABEL_SUFFIX ) ) ); fragment.append( getTriplePattern( getVarFragment( CELL_LINE_VAR ), getUriFragment( locationProperty.getURI() ), getVarFragment( LOCATION_VAR ) ) ); fragment.append( getTriplePattern( getVarFragment( LOCATION_VAR ), getUriFragment( RDFS.label.getURI() ), getVarFragment( LOCATION_VAR + LABEL_SUFFIX ) ) ); fragment.append( getTriplePattern( getVarFragment( CELL_LINE_VAR ), getUriFragment( EIAPP.derivesFromHumanSubject.getURI() ), getVarFragment( HUMAN_SUBJECT_VAR ) ) ); fragment.append( getTriplePattern( getVarFragment( HUMAN_SUBJECT_VAR ), getUriFragment( RDFS.label.getURI() ), getVarFragment( HUMAN_SUBJECT_VAR + LABEL_SUFFIX ) ) ); fragment.append( getTriplePattern( getVarFragment( HUMAN_SUBJECT_VAR ), "a", getUriFragment( humanSubjectType.getURI() ) ) ); return fragment; }
private Binding createBinding(Statement statement) { final String predicate = statement.getPredicate().getURI(); LOGGER.trace(" - Found binding for {}",predicate); return ProtocolFactory. newBinding(). withProperty(predicate). withValue(createValue(statement.getObject())). build(); }
public String getComputedOn(){ String selectQuery = "SELECT ?cOn { graph <"+currentGraphURI+"> { ?s <"+DAQ.computedOn.getURI()+"> ?cOn } }"; QueryExecution exec = QueryExecutionFactory.create(QueryFactory.create(selectQuery), dsLoader.getInternalDataset()); ResultSet set = exec.execSelect(); while(set.hasNext()){ QuerySolution qs = set.next(); Resource computedOn = qs.getResource("cOn"); return computedOn.getURI(); } return null; }