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

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

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

origin: protegeproject/webprotege

  @Nonnull
  @Override
  public Set<OWLAxiom> visit(OWLNamedIndividual subject) {
    Set<OWLAxiom> result = new HashSet<>();
    for (OWLClassExpression ce : classExpressions) {
      result.add(df.getOWLClassAssertionAxiom(ce, subject));
    }
    return result;
  }
});
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

  @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: owlcs/owlapi

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    if (BUILT_IN_VOCABULARY_IRIS.contains(o) && !o.isThing()) {
      // Can't have instance of built in vocabulary!
      // Shall we throw an exception here?
      LOGGER.info("Individual of builtin type {}", o);
    }
    add(df.getOWLClassAssertionAxiom(ce(o), ind(s), anns()));
    consume(s, p, o);
  }
}
origin: protegeproject/protege

public boolean dropObjects(List<OWLObject> objects) {
  List<OWLOntologyChange> changes = new ArrayList<>();
  for (OWLObject obj : objects) {
    if (obj instanceof OWLIndividual) {
      OWLIndividual ind = (OWLIndividual) obj;
      OWLAxiom ax = getOWLDataFactory().getOWLClassAssertionAxiom(getRootObject(), ind);
      changes.add(new AddAxiom(getOWLModelManager().getActiveOntology(), ax));
    }
  }
  getOWLModelManager().applyChanges(changes);
  return true;
}
origin: protegeproject/protege

private void handleAdd(OWLObject child, OWLObject toParent) {
  if (child instanceof OWLNamedIndividual){
    OWLNamedIndividual ind = (OWLNamedIndividual)child;
    List<OWLOntologyChange> changes = new ArrayList<>();
    if (toParent != null && toParent instanceof OWLClass){
      OWLClass to = (OWLClass)toParent;
      OWLClassAssertionAxiom ax = getOWLModelManager().getOWLDataFactory().getOWLClassAssertionAxiom(to, ind);
      changes.add(new AddAxiom(getOWLModelManager().getActiveOntology(), ax));
    }
    getOWLModelManager().applyChanges(changes);
  }
}
origin: owlcs/owlapi

@Override
public OWLClassAssertionAxiom visit(OWLClassAssertionAxiom axiom) {
  return df
    .getOWLClassAssertionAxiom(get(axiom.getClassExpression()), get(axiom.getIndividual()),
      anns(axiom));
}
origin: owlcs/owlapi

 final public OWLAxiom Instance() throws ParseException {OWLIndividual ind;
  OWLClassExpression type;
  jj_consume_token(OPENPAR);
  jj_consume_token(INSTANCE);
  ind = IndividualName();
  type = ConceptExpression();
  jj_consume_token(CLOSEPAR);
return df.getOWLClassAssertionAxiom(type, ind);
}

origin: owlcs/owlapi

@Override
public OWLClassAssertionAxiom visit(OWLClassAssertionAxiom ax) {
  return df.getOWLClassAssertionAxiom(t(ax.getClassExpression()), t(ax.getIndividual()),
          a(ax));
}
origin: net.sourceforge.owlapi/owlapi-distribution

 final public OWLAxiom Instance() throws ParseException {OWLIndividual ind;
  OWLClassExpression type;
  jj_consume_token(OPENPAR);
  jj_consume_token(INSTANCE);
  ind = IndividualName();
  type = ConceptExpression();
  jj_consume_token(CLOSEPAR);
return df.getOWLClassAssertionAxiom(type, ind);
}

origin: net.sourceforge.owlapi/owlapi-distribution

@Override
public OWLClassAssertionAxiom visit(OWLClassAssertionAxiom axiom) {
  return df
    .getOWLClassAssertionAxiom(get(axiom.getClassExpression()), get(axiom.getIndividual()),
      anns(axiom));
}
origin: protegeproject/protege

protected List<OWLOntologyChange> dofurtherCreateSteps(OWLIndividual newIndividual) {
  OWLClass cls = getOWLWorkspace().getOWLSelectionModel().getLastSelectedClass();
  if (cls != null && !cls.isOWLThing()) {
    OWLAxiom typeAxiom = getOWLModelManager().getOWLDataFactory().getOWLClassAssertionAxiom(cls, newIndividual);
    OWLOntologyChange change = new AddAxiom(getOWLModelManager().getActiveOntology(), typeAxiom);
    return Collections.singletonList(change);
  }
  return new ArrayList<>();
}
origin: owlcs/owlapi

@Override
public void visit(OWLClassAssertionAxiom ax) {
  obj = df.getOWLClassAssertionAxiom(dup(ax.getClassExpression()), dup(ax.getIndividual()),
    anns(ax));
}
origin: owlcs/owlapi

@Override
public OWLAxiom visit(OWLClassAssertionAxiom axiom) {
  if (axiom.getClassExpression().isAnonymous()) {
    return df.getOWLClassAssertionAxiom(axiom.getClassExpression().accept(classVisitor),
      axiom.getIndividual());
  }
  return axiom;
}
origin: owlcs/owlapi

 final public void Instance() throws ParseException, KRSS2OWLParserException {OWLIndividual ind;
  OWLClassExpression type;
  jj_consume_token(OPENPAR);
  jj_consume_token(INSTANCE);
  ind = IndividualName();
  type = ConceptExpression();
  jj_consume_token(CLOSEPAR);
addAxiom( df.getOWLClassAssertionAxiom(type, ind));
}

origin: owlcs/owlapi

 final public OWLIndividualAxiom ClassAssertion() throws ParseException {OWLIndividual ind;
  OWLClassExpression desc;
  Set<OWLAnnotation> axiomAnnos;
  jj_consume_token(CLASSASSERTION);
  jj_consume_token(OPENPAR);
  axiomAnnos = AxiomAnnotationSet();
  desc = ClassExpression();
  ind = Individual();
  jj_consume_token(CLOSEPAR);
return df.getOWLClassAssertionAxiom(desc, ind, axiomAnnos);
}

origin: owlcs/owlapi

private OWLAxiom parseAxiomWithIndividualStart() {
  OWLIndividual ind = parseIndividual();
  String kw = consumeToken();
  if (TYPE.matches(kw)) {
    OWLClassExpression type = parseClassExpression();
    return df.getOWLClassAssertionAxiom(type, ind);
  }
  throw new ExceptionBuilder().withKeyword(TYPE).build();
}
origin: owlcs/owlapi

@Override
public Object visit(OWLClassAssertionAxiom axiom) {
  return visitAxiom(axiom,
    () -> df.getOWLClassAssertionAxiom(t(axiom.getClassExpression()), t(axiom
      .getIndividual()), t(axiom.annotations())));
}
origin: protegeproject/protege

/**
 * Invoked when an action occurs.
 */
public void actionPerformed(ActionEvent e) {
  OWLEntityCreationSet<OWLNamedIndividual> set = getOWLWorkspace().createOWLIndividual();
  if (set == null) {
    return;
  }
  OWLClass thing = getOWLDataFactory().getOWLThing();
  OWLAxiom ax = getOWLDataFactory().getOWLClassAssertionAxiom(thing, set.getOWLEntity());
  getOWLModelManager().applyChange(new AddAxiom(getOWLModelManager().getActiveOntology(), ax));
}
origin: protegeproject/protege

  /**
   * Invoked when an action occurs.
   */
  public void actionPerformed(ActionEvent e) {
    OWLIndividual ind = getOWLWorkspace().createOWLIndividual().getOWLEntity();
    OWLClass selectedClass = getOWLWorkspace().getOWLSelectionModel().getLastSelectedClass();
    OWLAxiom ax = getOWLDataFactory().getOWLClassAssertionAxiom(selectedClass, ind);
    getOWLModelManager().applyChange(new AddAxiom(getOWLModelManager().getActiveOntology(), ax));
  }
}
org.semanticweb.owlapi.modelOWLDataFactorygetOWLClassAssertionAxiom

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
  • 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

  • Start an intent from android
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • Menu (java.awt)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Table (org.hibernate.mapping)
    A relational table
  • Top 25 Plugins for Webstorm
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