congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ValueFactory.createIRI
Code IndexAdd Tabnine 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)

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 trackIriFor (final @Nonnull Id id)
 {
  return FACTORY.createIRI("urn:bluemarine:track:" + id.stringValue());
 }
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: 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

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JTable (javax.swing)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now