Codota Logo
Models.objectLiteral
Code IndexAdd Codota to your IDE (free)

How to use
objectLiteral
method
in
org.openrdf.model.util.Models

Best Java code snippets using org.openrdf.model.util.Models.objectLiteral (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.openrdf.sesame/sesame-model

/**
 * @deprecated since 4.0. Use {@link #objectLiteral(Model)} instead.
 */
@Deprecated
public static Literal anyObjectLiteral(Model m) {
  return objectLiteral(m).orElse(null);
}
origin: org.openrdf.sesame/sesame-repository-sail

  @Override
  public void parse(Model model, Resource implNode)
    throws RepositoryConfigException
  {
    super.parse(model, implNode);

    try {
      Models.objectLiteral(model.filter(implNode, ProxyRepositorySchema.PROXIED_ID, null)).ifPresent(
          lit -> setProxiedRepositoryID(lit.getLabel()));
    }
    catch (ModelException e) {
      throw new RepositoryConfigException(e.getMessage(), e);
    }
  }
}
origin: org.openrdf.sesame/sesame-sail-spin

  @Override
  public void parse(Model m, Resource implNode)
    throws SailConfigException
  {
    super.parse(m, implNode);

    try {
      Models.objectLiteral(m.filter(implNode, SpinSailSchema.AXIOM_CLOSURE_NEEDED, null)).ifPresent(
          lit -> setAxiomClosureNeeded(lit.booleanValue()));
    }
    catch (ModelException e) {
      throw new SailConfigException(e.getMessage(), e);
    }
  }
}
origin: org.openrdf.sesame/sesame-sail-inferencer

Optional<Literal> language = Models.objectLiteral(m.filter(implNode, QUERY_LANGUAGE, null));
  Models.objectLiteral(m.filter(object.get(), SP.TEXT_PROPERTY, null)).ifPresent(
      lit -> setRuleQuery(lit.stringValue()));
  Models.objectLiteral(m.filter(object.get(), SP.TEXT_PROPERTY, null)).ifPresent(
      lit -> setMatcherQuery(lit.stringValue()));
origin: org.openrdf.sesame/sesame-repository-contextaware

Models.objectLiteral(model.filter(resource, INCLUDE_INFERRED, null)).ifPresent(
    lit -> setIncludeInferred(lit.booleanValue()));
Models.objectLiteral(model.filter(resource, MAX_QUERY_TIME, null)).ifPresent(
    lit -> setMaxQueryTime(lit.intValue()));
Models.objectLiteral(model.filter(resource, QUERY_LANGUAGE, null)).ifPresent(
    lit -> setQueryLanguage(QueryLanguage.valueOf(lit.getLabel())));
origin: org.openrdf.sesame/sesame-repository-sail

  @Override
  public void parse(Model model, Resource repImplNode)
    throws RepositoryConfigException
  {
    try {
      Optional<Resource> sailImplNode = Models.objectResource(model.filter(repImplNode, SAILIMPL, null));
      if (sailImplNode.isPresent()) {
        Models.objectLiteral(model.filter(sailImplNode.get(), SAILTYPE, null)).ifPresent(typeLit -> {
          SailFactory factory = SailRegistry.getInstance().get(typeLit.getLabel()).orElseThrow(
              () -> new RepositoryConfigException("Unsupported Sail type: " + typeLit.getLabel()));

          sailImplConfig = factory.getConfig();
          sailImplConfig.parse(model, sailImplNode.get());
        });
      }
    }
    catch (ModelException e) {
      throw new RepositoryConfigException(e.getMessage(), e);
    }
    catch (SailConfigException e) {
      throw new RepositoryConfigException(e.getMessage(), e);
    }
  }
}
origin: org.openrdf.sesame/sesame-sail-federation

Optional<Literal> bool = Models.objectLiteral(model.filter(implNode, DISTINCT, null));
if (bool.isPresent() && bool.get().booleanValue()) {
  distinct = true;
bool = Models.objectLiteral(model.filter(implNode, READ_ONLY, null));
if (bool.isPresent() && bool.get().booleanValue()) {
  readOnly = true;
origin: org.openrdf.sesame/sesame-sail-lucene-api

  @Override
  public void parse(Model graph, Resource implNode)
    throws SailConfigException
  {
    super.parse(graph, implNode);

    Literal indexDirLit = Models.objectLiteral(graph.filter(implNode, INDEX_DIR, null)).orElseThrow(
        () -> new SailConfigException("no value found for " + INDEX_DIR));

    setIndexDir(indexDirLit.getLabel());
    for (Statement stmt : graph.filter(implNode, null, null)) {
      if (stmt.getPredicate().getNamespace().equals(LuceneSailConfigSchema.NAMESPACE)) {
        if (stmt.getObject() instanceof Literal) {
          String key = stmt.getPredicate().getLocalName();
          setParameter(key, stmt.getObject().stringValue());
        }
      }
    }
  }
}
org.openrdf.model.utilModelsobjectLiteral

Javadoc

Retrieves an object Literal value from the statements in the given model. If more than one possible Literal value exists, any one Literal value is picked and returned.

Popular methods of Models

  • isomorphic
    Compares two RDF models, and returns true if they consist of isomorphic graphs and the isomorphic gr
  • objectIRI
    Retrieves an object IRI value from the statements in the given model. If more than one possible IRI
  • objectResource
    Retrieves an object Resource value from the statements in the given model. If more than one possible
  • isSubset
    Compares two RDF models, and returns true if the first model is a subset of the second model, using
  • findMatchingStatements
  • isSubsetInternal
  • matchModels
  • object
    Retrieves an object Value from the statements in the given model. If more than one possible object v
  • predicate
    Retrieves a predicate from the statements in the given model. If more than one possible predicate va
  • statementsMatch
  • subject
    Retrieves a subject Resource from the statements in the given model. If more than one possible resou
  • subjectBNode
    Retrieves a subject BNode from the statements in the given model. If more than one possible blank no
  • subject,
  • subjectBNode,
  • subjectIRI,
  • toSet

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Table (org.hibernate.mapping)
    A relational table
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