Tabnine Logo
Models.objectLiteral
Code IndexAdd Tabnine 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)

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
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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