congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
OWLDataFactory.getOWLLiteral
Code IndexAdd Tabnine to your IDE (free)

How to use
getOWLLiteral
method
in
org.semanticweb.owlapi.model.OWLDataFactory

Best Java code snippets using org.semanticweb.owlapi.model.OWLDataFactory.getOWLLiteral (Showing top 20 results out of 423)

origin: owlcs/owlapi

/**
 * @param arg double value
 * @return builder
 */
public BuilderFacetRestriction withLiteral(double arg) {
  literal = df.getOWLLiteral(arg);
  return this;
}
origin: owlcs/owlapi

/**
 * @param arg int value
 * @return builder
 */
public BuilderFacetRestriction withLiteral(int arg) {
  literal = df.getOWLLiteral(arg);
  return this;
}
origin: owlcs/owlapi

/**
 * @param arg float value
 * @return builder
 */
public BuilderFacetRestriction withLiteral(float arg) {
  literal = df.getOWLLiteral(arg);
  return this;
}
origin: protegeproject/protege

  @Override
  public OWLLiteral formatDate(Date date, OWLDataFactory dataFactory) {
    String format = df.format(date);
    return dataFactory.getOWLLiteral(format, OWL2Datatype.XSD_DATE_TIME);
  }
}
origin: protegeproject/protege

  @Override
  public OWLLiteral formatDate(Date date, OWLDataFactory dataFactory) {
    return dataFactory.getOWLLiteral(Long.toString(date.getTime()), OWL2Datatype.XSD_LONG);
  }
}
origin: protegeproject/protege

  public Optional<OWLLiteral> parse(String value, OWLDataFactory dataFactory) {
    String normalisedValue = normalisation.apply(value);
    if(pattern.matcher(normalisedValue).matches()) {
      return Optional.of(dataFactory.getOWLLiteral(normalisedValue, datatype));
    }
    else {
      return Optional.absent();
    }
  }
}
origin: protegeproject/protege

  @Override
  public Optional<OWLAnnotationValue> getAnnotationValue(OWLDataFactory dataFactory) {
    Optional<String> userName = userNameProvider.getUserName();
    if(userName.isPresent()) {
      return Optional.of(dataFactory.getOWLLiteral(userName.get()));
    }
    else {
      return Optional.empty();
    }
  }
}
origin: owlcs/owlapi

private OWLLiteral process(OWLDataPropertyExpression prop, OWLLiteral con) {
  OWLDatatype dt = map.get(prop);
  if (dt == null) {
    return con;
  }
  return df.getOWLLiteral(con.getLiteral(), dt);
}
origin: protegeproject/protege

private OWLLiteral parse(String value, LiteralParser ... parsers) {
  for(LiteralParser parser : parsers) {
    Optional<OWLLiteral> lit = parser.parse(value, dataFactory);
    if(lit.isPresent()) {
      return lit.get();
    }
  }
  return dataFactory.getOWLLiteral(value, "");
}
origin: owlcs/owlapi

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSComment(), getOWLLiteral(value))}
 *
 * @param value The annotation value.
 * @return an rdfs:comment annotation with provided value
 */
default OWLAnnotation getRDFSComment(String value) {
  return getOWLAnnotation(getRDFSComment(), getOWLLiteral(value));
}
origin: protegeproject/webprotege

private static OWLLiteral getLabellingLiteral(String suppliedName, Optional<String> langTag, EntityCrudContext context) {
  OWLDataFactory dataFactory = context.getDataFactory();
  DictionaryLanguage dictionaryLanguage = context.getDictionaryLanguage();
  return dataFactory.getOWLLiteral(suppliedName, langTag.orElse(dictionaryLanguage.getLang()));
}
origin: owlcs/owlapi

  private OWLAnnotation getSynonymTypeAnnotation(Matcher matcher) {
    OWLDataFactory df = getDataFactory();
    String synonymType = matcher.group(SYNONYM_TYPE_GROUP);
    return df.getOWLAnnotation(df.getOWLAnnotationProperty(SYNONYM_TYPE_IRI),
      df.getOWLLiteral(synonymType));
  }
}
origin: owlcs/owlapi

@Override
public OWLLiteral visit(OWLLiteral node) {
  OWLLiteral l = replacementLiterals.get(node);
  if (l != null) {
    return l;
  }
  if (node.hasLang()) {
    return df.getOWLLiteral(node.getLiteral(), node.getLang());
  }
  return df.getOWLLiteral(node.getLiteral(), t(node.getDatatype()));
}
origin: owlcs/owlapi

@Override
public OWLLiteral visit(OWLLiteral node) {
  if (node.hasLang()) {
    return df.getOWLLiteral(node.getLiteral(), node.getLang());
  }
  return df.getOWLLiteral(node.getLiteral(), get(node.getDatatype()));
}
origin: owlcs/owlapi

@Override
public void visit(OWLLiteral node) {
  if (node.hasLang()) {
    obj = df.getOWLLiteral(node.getLiteral(), node.getLang());
  } else {
    obj = df.getOWLLiteral(node.getLiteral(), dup(node.getDatatype()));
  }
}
origin: owlcs/owlapi

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    consume(s, p, o);
    addR(s, false);
    // Patch to new OWL syntax
    consumer.addTriple(s, OWL_HAS_SELF.getIRI(), df.getOWLLiteral(true));
  }
}
origin: protegeproject/protege

private OWLAnnotation generateLabelAnnotation(String label) {
  OWLDataFactory df = mngr.getOWLDataFactory();
  OWLAnnotationProperty aProp = getPreferredLabel();
  String lang = getPreferredLanguage();
  OWLLiteral value = df.getOWLLiteral(label, lang);
  return df.getOWLAnnotation(aProp, value);
}
origin: protegeproject/protege

private List<? extends OWLOntologyChange> createLabel(OWLEntity owlEntity, String value) {
  LabelDescriptor descr = getLabelDescriptor();
  IRI iri = descr.getIRI();
  String lang = descr.getLanguage();
  OWLDataFactory df = mngr.getOWLDataFactory();
  OWLLiteral con = df.getOWLLiteral(value, lang);
  OWLAnnotationProperty prop = df.getOWLAnnotationProperty(iri);
  OWLAxiom ax = df.getOWLAnnotationAssertionAxiom(prop, owlEntity.getIRI(), con);
  return Collections.singletonList(new AddAxiom(mngr.getActiveOntology(), ax));
}
origin: owlcs/owlapi

  @Override
  public void handle(String currentId, String value, String qualifierBlock, String comment) {
    OWLDataFactory df = getDataFactory();
    OWLAnnotationProperty deprecatedProperty = df.getOWLDeprecated();
    OWLLiteral annotationValue = df.getOWLLiteral(true);
    IRI subject = getIRIFromOBOId(currentId);
    OWLAnnotationAssertionAxiom ax = df
      .getOWLAnnotationAssertionAxiom(deprecatedProperty, subject,
        annotationValue);
    applyChange(new AddAxiom(getOntology(), ax));
  }
}
origin: owlcs/owlapi

@Override
public void visit(OWLObjectHasSelf ce) {
  translateAnonymousNode(ce);
  addTriple(ce, RDF_TYPE.getIRI(), OWL_RESTRICTION.getIRI());
  addTriple(ce, OWL_ON_PROPERTY.getIRI(), ce.getProperty());
  addTriple(ce, OWL_HAS_SELF.getIRI(), manager.getOWLDataFactory().getOWLLiteral(true));
}
org.semanticweb.owlapi.modelOWLDataFactorygetOWLLiteral

Javadoc

Convenience method that obtains a literal typed as a double.

Popular methods of OWLDataFactory

  • getOWLClass
    Gets an OWL class that has the specified IRI
  • getOWLNamedIndividual
    Gets an OWL individual that has the specified IRI
  • getOWLObjectProperty
    Gets an OWL object property that has the specified IRI
  • getOWLSubClassOfAxiom
  • getOWLClassAssertionAxiom
  • getOWLDataProperty
    Gets an OWL data property that has the specified IRI
  • getOWLThing
    Gets the built in owl:Thing class, which has a URI of
  • getOWLAnnotationProperty
    Gets an OWLAnnotationProperty that has the specified IRI
  • getOWLDeclarationAxiom
    Gets a declaration with zero or more annotations for an entity
  • getOWLObjectIntersectionOf
  • getOWLEquivalentClassesAxiom
  • getOWLObjectSomeValuesFrom
    Gets an OWLObjectSomeValuesFrom restriction
  • getOWLEquivalentClassesAxiom,
  • getOWLObjectSomeValuesFrom,
  • getOWLNothing,
  • getOWLObjectComplementOf,
  • getOWLObjectPropertyAssertionAxiom,
  • getOWLAnnotationAssertionAxiom,
  • getOWLDataPropertyAssertionAxiom,
  • getOWLDatatype,
  • getOWLAnnotation

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • JCheckBox (javax.swing)
  • 14 Best Plugins for Eclipse
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