Codota Logo
ValueFactory.createIRI
Code IndexAdd Codota to your IDE (free)

How to use
createIRI
method
in
org.eclipse.rdf4j.model.ValueFactory

Best Java code snippets using org.eclipse.rdf4j.model.ValueFactory.createIRI (Showing top 20 results out of 684)

  • Common ways to obtain ValueFactory
private void myMethod () {
ValueFactory v =
  • Codota IconSimpleValueFactory.getInstance()
  • Codota IconRepositoryConnection conn;conn.getValueFactory()
  • Codota IconRepository repository;repository.getValueFactory()
  • Smart code suggestions by Codota
}
origin: org.apache.any23/apache-any23-core

/**
 * Creates a {@link org.eclipse.rdf4j.model.IRI}.
 * @param iri a base string for the {@link org.eclipse.rdf4j.model.IRI}
 * @return a valid {@link org.eclipse.rdf4j.model.IRI}
 */
public static org.eclipse.rdf4j.model.IRI iri(String iri) {
  return valueFactory.createIRI(iri);
}
origin: org.apache.any23/apache-any23-core

/**
 * Creates a {@link org.eclipse.rdf4j.model.IRI}.
 * @param namespace a base namespace for the {@link org.eclipse.rdf4j.model.IRI}
 * @param localName a local name to associate with the namespace
 * @return a valid {@link org.eclipse.rdf4j.model.IRI}
 */
public static org.eclipse.rdf4j.model.IRI iri(String namespace, String localName) {
  return valueFactory.createIRI(namespace, localName);
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-commons

/*******************************************************************************************************************
 *
 *
 ******************************************************************************************************************/
@Nonnull
public static IRI uriFor (final @Nonnull URL url)
 {
  return FACTORY.createIRI(url.toString());
 }
origin: Wikidata/Wikidata-Toolkit

public void writeTripleUriObject(String subjectUri, IRI predicate,
    String objectUri) throws RDFHandlerException {
  writeTripleValueObject(subjectUri, predicate,
      factory.createIRI(objectUri));
}
origin: org.apache.any23/apache-any23-core

/**
 * @return a valid sesame IRI or null if any exception occurred
 */
@Override
public IRI createIRI(String namespace, String localName) {
  if (namespace == null || localName == null)
    return null;
  return wrappedFactory.createIRI(RDFUtils.fixIRIWithException(namespace), localName);
}
origin: org.eclipse.rdf4j/rdf4j-queryresultio-binary

private IRI readURI()
  throws IOException
{
  String uri = readString();
  return valueFactory.createIRI(uri);
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-vocabulary

@Nonnull
public static IRI recordIriFor (final @Nonnull Id id)
 {
  return FACTORY.createIRI("urn:bluemarine:record:" + id.stringValue());
 }
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-vocabulary

 @Nonnull
 public static IRI artistIriFor (final @Nonnull Id id)
  {
   return FACTORY.createIRI("urn:bluemarine:artist:" + id.stringValue());
  }
}
origin: it.tidalwave.bluemarine2/it-tidalwave-bluemarine2-vocabulary

@Nonnull
public static IRI trackIriFor (final @Nonnull Id id)
 {
  return FACTORY.createIRI("urn:bluemarine:track:" + id.stringValue());
 }
origin: de.tudarmstadt.ukp.inception.rdf4j/rdf4j-sail-spin

public SpinMagicPropertyInterpreter(SpinParser parser, TripleSource tripleSource,
    TupleFunctionRegistry tupleFunctionRegistry, AbstractFederatedServiceResolver serviceResolver)
{
  this.parser = parser;
  this.tripleSource = tripleSource;
  this.tupleFunctionRegistry = tupleFunctionRegistry;
  this.serviceResolver = serviceResolver;
  this.spinServiceUri = tripleSource.getValueFactory().createIRI(SPIN_SERVICE);
}
origin: org.eclipse.rdf4j/rdf4j-queryresultio-binary

private IRI readQName()
  throws IOException
{
  int nsID = in.readInt();
  String localName = readString();
  return valueFactory.createIRI(namespaceArray[nsID], localName);
}
origin: org.eclipse.rdf4j/rdf4j-client

@Override
public IRI createIRI(String iri) {
  try {
    if (!new ParsedIRI(iri).isAbsolute()) {
      throw new IllegalArgumentException("IRI must be absolute");
    }
    return delegate.createIRI(iri);
  }
  catch (URISyntaxException e) {
    throw new IllegalArgumentException(e);
  }
}
origin: org.apache.any23/apache-any23-core

/**
 * @param iri IRI to fix
 * @return a valid sesame IRI or null if any exception occurred
 */
public IRI fixIRI(String iri) {
  try {
    return wrappedFactory.createIRI(RDFUtils.fixIRIWithException(iri));
  } catch (Exception e) {
    reportError(e);
    return null;
  }
}
origin: org.eclipse.rdf4j/rdf4j-http-server-spring

private Resource getContext(String repositoryID) {
  String location;
  try {
    location = manager.getLocation().toURI().toString();
  }
  catch (MalformedURLException | URISyntaxException e) {
    assert false;
    location = "urn:" + repositoryID;
  }
  String url = Protocol.getRepositoryLocation(location, repositoryID);
  return getValueFactory().createIRI(url + "#" + repositoryID);
}
origin: org.eclipse.rdf4j/rdf4j-queryparser-serql

@Override
public ValueConstant visit(ASTURI node, Object data)
  throws VisitorException
{
  return new ValueConstant(valueFactory.createIRI(node.getValue()));
}
origin: de.tudarmstadt.ukp.inception.app/inception-kb

public void applyRootConcepts(KnowledgeBaseProfile aProfile)
{
  if (aProfile.getRootConcepts() == null) {
    setRootConcepts(new ArrayList<>());
  }
  else {
    ValueFactory vf = SimpleValueFactory.getInstance();
    for (String rootConcept : aProfile.getRootConcepts()) {
      rootConcepts.add(vf.createIRI(rootConcept));
    }
  }
}
origin: org.eclipse.rdf4j/rdf4j-sail-spin

  private Function getFunction(String name, TripleSource tripleSource, FunctionRegistry functionRegistry)
    throws RDF4JException
  {
    Function func = functionRegistry.get(name).orElse(null);
    if (func == null) {
      IRI funcUri = tripleSource.getValueFactory().createIRI(name);
      func = parser.parseFunction(funcUri, tripleSource);
      functionRegistry.add(func);
    }
    return func;
  }
}
origin: ontop/ontop

public static Resource getResource(ObjectConstant obj) {
  if (obj instanceof BNode)
    return fact.createBNode(((BNode)obj).getName());
  else if (obj instanceof IRIConstant)
    return fact.createIRI(((IRIConstant) obj).getIRI().getIRIString());
  else
    return null;
    //throw new IllegalArgumentException("Invalid constant as subject!" + obj);
}
origin: org.eclipse.rdf4j/rdf4j-repository-sparql

@Override
public Resource export(Model m) {
  Resource implNode = super.export(m);
  m.setNamespace("sparql", NAMESPACE);
  if (getQueryEndpointUrl() != null) {
    m.add(implNode, QUERY_ENDPOINT, vf.createIRI(getQueryEndpointUrl()));
  }
  if (getUpdateEndpointUrl() != null) {
    m.add(implNode, UPDATE_ENDPOINT, vf.createIRI(getUpdateEndpointUrl()));
  }
  return implNode;
}
origin: org.semarglproject/semargl-rdf4j

@Override
public final void addNonLiteral(String subj, String pred, String obj, String graph) {
  if (graph == null) {
    addNonLiteral(subj, pred, obj);
  } else {
    addQuad(convertNonLiteral(subj), valueFactory.createIRI(pred), convertNonLiteral(obj),
        convertNonLiteral(graph));
  }
}
org.eclipse.rdf4j.modelValueFactorycreateIRI

Javadoc

Creates a new IRI from the supplied string-representation.

Popular methods of ValueFactory

  • createLiteral
  • createStatement
    Creates a new statement with the supplied subject, predicate and object and associated context.
  • createBNode
    Creates a new blank node with the given node identifier.
  • createURI
    Creates a new URI from the supplied namespace and local name.

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now