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

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

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

origin: owlcs/owlapi

/**
 * Gets the oWL class.
 *
 * @param iri the iri
 * @return the oWL class
 */
protected OWLClass getOWLClass(IRI iri) {
  return df.getOWLClass(iri);
}
origin: protegeproject/protege

@Nonnull
@Override
public Optional<OWLAxiom> visit(@Nonnull OWLNamedIndividual individual) {
  return strategy.getDeprecatedIndividualParentClassIri()
          .map(parent -> dataFactory.getOWLClassAssertionAxiom(dataFactory.getOWLClass(parent), individual));
}
origin: owlcs/owlapi

protected OWLClass createNewName() {
  OWLClass cls = df.getOWLClass("http://www.semanticweb.org/ontology#", "X" + nameCounter);
  nameCounter++;
  return cls;
}
origin: owlcs/owlapi

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    OWLIndividual ind = df.getOWLNamedIndividual(s);
    OWLClass skosConcept = df.getOWLClass(o);
    add(df.getOWLClassAssertionAxiom(skosConcept, ind));
  }
}
origin: net.sourceforge.owlapi/owlapi-distribution

/**
 * Gets the oWL class.
 *
 * @param iri the iri
 * @return the oWL class
 */
protected OWLClass getOWLClass(IRI iri) {
  return df.getOWLClass(iri);
}
origin: protegeproject/protege

@Nonnull
@Override
public Optional<OWLAxiom> visit(@Nonnull OWLClass cls) {
  return strategy.getDeprecatedClassParentIri()
          .map(parent -> dataFactory.getOWLSubClassOfAxiom(cls, dataFactory.getOWLClass(parent)));
}
origin: net.sourceforge.owlapi/owlapi-distribution

/**
 * @param dataFactory data factory to use
 * @return set of SKOS classes
 */
public static Set<OWLClass> getClasses(OWLDataFactory dataFactory) {
  return asSet(stream().filter(v -> v.entityType.equals(CLASS))
    .map(v -> dataFactory.getOWLClass(v.iri)));
}
origin: owlcs/owlapi

@Override
@Nullable
public OWLClass getOWLClass(String name) {
  if ("Thing".equals(name) || "owl:Thing".equals(name)) {
    return df.getOWLThing();
  } else if ("Nothing".equals(name) || "owl:Nothing".equals(name)) {
    return df.getOWLNothing();
  } else if (classNames.contains(name)) {
    return df.getOWLClass(getIRI(name));
  }
  return null;
}
origin: owlcs/owlapi

  @Override
  public OWLClass buildObject() {
    if (pm != null && string != null) {
      return df.getOWLClass(getString(), getPM());
    }
    return df.getOWLClass(getIRI());
  }
}
origin: net.sourceforge.owlapi/owlapi-distribution

  @Override
  public OWLClass buildObject() {
    if (pm != null && string != null) {
      return df.getOWLClass(getString(), getPM());
    }
    return df.getOWLClass(getIRI());
  }
}
origin: owlcs/owlapi

private static Map<OWLEntity, IRI> remap(Map<IRI, IRI> iriReplacementMap, OWLDataFactory df) {
  Map<OWLEntity, IRI> map = new HashMap<>();
  iriReplacementMap.forEach((k, v) -> {
    map.put(df.getOWLClass(k), v);
    map.put(df.getOWLObjectProperty(k), v);
    map.put(df.getOWLDataProperty(k), v);
    map.put(df.getOWLNamedIndividual(k), v);
    map.put(df.getOWLDatatype(k), v);
    map.put(df.getOWLAnnotationProperty(k), v);
  });
  return map;
}
origin: protegeproject/protege

public OWLEntityCreationSet<OWLClass> createAnonymousClass(OWLOntology ont, OWLClassExpression descr){
  OWLClass anonCls = mngr.getOWLDataFactory().getOWLClass(getNextID());
  List<OWLOntologyChange> changes = new ArrayList<>();
  changes.add(new AddAxiom(ont, mngr.getOWLDataFactory().getOWLEquivalentClassesAxiom(anonCls, descr)));
  return new OWLEntityCreationSet<>(anonCls, changes);
}
origin: protegeproject/protege

public String render(IRI iri) {
  // doesn't matter what type of entity we choose - the same value is returned.
  OWLEntity entity = getOWLModelManager().getOWLDataFactory().getOWLClass(iri);
  String shortForm = provider.getShortForm(entity);
  return escape(shortForm);
}
origin: edu.stanford.protege/org.protege.editor.owl

public String render(IRI iri) {
  // doesn't matter what type of entity we choose - the same value is returned.
  OWLEntity entity = getOWLModelManager().getOWLDataFactory().getOWLClass(iri);
  String shortForm = provider.getShortForm(entity);
  return escape(shortForm);
}
origin: owlcs/owlapi

protected OWLClassExpression getOWLClassOrRestriction(String termList) {
  String[] strings = termList.split(" ");
  if (strings.length == 1) {
    return getDataFactory().getOWLClass(getIRIFromOBOId(strings[0]));
  }
  String id0 = strings[0];
  String id1 = strings[1];
  IRI propertyIRI = getConsumer().getRelationIRIFromSymbolicIdOrOBOId(id0);
  OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(propertyIRI);
  OWLClass filler = getDataFactory().getOWLClass(getIRIFromOBOId(id1));
  return getDataFactory().getOWLObjectSomeValuesFrom(prop, filler);
}
origin: owlcs/owlapi

private OWLClass getOWLClass(String name) {
  OWLClass cls = checker.getOWLClass(name);
  if (cls == null && classNames.contains(name)) {
    cls = df.getOWLClass(getIRI(name));
  }
  if (cls == null) {
    throw new ExceptionBuilder().withKeyword(potentialKeywords).withClass().build();
  }
  return cls;
}
origin: net.sourceforge.owlapi/owlapi-parsers

private OWLClass getOWLClass(String name) {
  OWLClass cls = checker.getOWLClass(name);
  if (cls == null && classNames.contains(name)) {
    cls = df.getOWLClass(getIRI(name));
  }
  if (cls == null) {
    throw new ExceptionBuilder().withKeyword(potentialKeywords).withClass().build();
  }
  return cls;
}
origin: owlcs/owlapi

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    if (!isAnon(s)) {
      OWLClass owlClass = df.getOWLClass(s);
      add(df.getOWLDeclarationAxiom(owlClass, anns()));
    }
    addCe(s, true);
  }
}
origin: net.sourceforge.owlapi/owlapi-osgidistribution

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    if (!isAnon(s)) {
      OWLClass owlClass = df.getOWLClass(s);
      add(df.getOWLDeclarationAxiom(owlClass, anns()));
    }
    addCe(s, true);
  }
}
origin: net.sourceforge.owlapi/owlapi-parsers

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    if (!isAnon(s)) {
      OWLClass owlClass = df.getOWLClass(s);
      add(df.getOWLDeclarationAxiom(owlClass, anns()));
    }
    addCe(s, true);
  }
}
org.semanticweb.owlapi.modelOWLDataFactorygetOWLClass

Javadoc

Gets an OWLClass that has an IRI that is obtained by expanding an abbreviated name using an appropriate prefix mapping. See The OWL 2 Structural Specification for more details.

Popular methods of OWLDataFactory

  • 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
  • getOWLLiteral
    Convenience method that obtains a literal typed as a boolean.
  • 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

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 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