congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
OWLDataFactory.getOWLDeprecated
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.semanticweb.owlapi.model.OWLDataFactory.getOWLDeprecated (Showing top 15 results out of 315)

origin: protegeproject/protege

/**
 * Adds an annotation assertion that specifies that the entity is deprecated.
 *
 * @param changes A list of changes that the enacting change will be added to.
 */
private void addDeprecatedAnnotationAssertion(@Nonnull List<OWLOntologyChange> changes) {
  OWLAnnotationAxiom ax = dataFactory.getOWLAnnotationAssertionAxiom(
      dataFactory.getOWLDeprecated(),
      info.getEntityToDeprecate().getIRI(),
      dataFactory.getOWLLiteral(true)
  );
  logger.info("[Deprecate Entity] Added owl:deprecated annotation");
  changes.add(new AddAxiom(getHomeOntology(), 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: com.github.ansell.owlapi/owlapi-parsers

  @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: net.sourceforge.owlapi/owlapi-obo

  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: net.sourceforge.owlapi/owlapi-compatibility

  @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: net.sourceforge.owlapi/owlapi-osgidistribution

  @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: edu.stanford.protege/org.protege.owl.diff

  public boolean isRetirementAxiom(OWLAxiom axiom) {
    boolean ret = false;
    if (axiom instanceof OWLSubClassOfAxiom) {
      OWLSubClassOfAxiom subClassAxiom = (OWLSubClassOfAxiom) axiom;
      ret = !subClassAxiom.getSubClass().isAnonymous() && 
          !subClassAxiom.getSuperClass().isAnonymous() &&
          subClassAxiom.getSuperClass().asOWLClass().getIRI().toString().startsWith(retirementClassPrefix);
    }
    else if (axiom instanceof OWLAnnotationAssertionAxiom && retirementStatusProperty != null) {
      OWLAnnotationAssertionAxiom annotationAxiom = (OWLAnnotationAssertionAxiom) axiom;
      OWLAnnotationProperty property = annotationAxiom.getAnnotation().getProperty();
      if (property.equals(retirementStatusProperty)) {
        ret = annotationAxiom.getAnnotation().getValue() instanceof OWLLiteral
             && ((OWLLiteral) annotationAxiom.getAnnotation().getValue()).getLiteral().equals(retirementStatusString);
      }
      else if (property.equals(factory.getOWLDeprecated())) {
        ret = annotationAxiom.getAnnotation().getValue() instanceof OWLLiteral
             && ((OWLLiteral) annotationAxiom.getAnnotation().getValue()).getLiteral().toLowerCase().equals("true");
      }
      else if (retirementMetaProperties.contains(property)) {
        ret = true;
      }
    }
    return ret;
  }
}
origin: edu.stanford.protege/owl-diff-engine

  public boolean isRetirementAxiom(OWLAxiom axiom) {
    boolean ret = false;
    if (axiom instanceof OWLSubClassOfAxiom) {
      OWLSubClassOfAxiom subClassAxiom = (OWLSubClassOfAxiom) axiom;
      ret = !subClassAxiom.getSubClass().isAnonymous() && 
          !subClassAxiom.getSuperClass().isAnonymous() &&
          subClassAxiom.getSuperClass().asOWLClass().getIRI().toString().startsWith(retirementClassPrefix);
    }
    else if (axiom instanceof OWLAnnotationAssertionAxiom && retirementStatusProperty != null) {
      OWLAnnotationAssertionAxiom annotationAxiom = (OWLAnnotationAssertionAxiom) axiom;
      OWLAnnotationProperty property = annotationAxiom.getAnnotation().getProperty();
      if (property.equals(retirementStatusProperty)) {
        ret = annotationAxiom.getAnnotation().getValue() instanceof OWLLiteral
             && ((OWLLiteral) annotationAxiom.getAnnotation().getValue()).getLiteral().equals(retirementStatusString);
      }
      else if (property.equals(factory.getOWLDeprecated())) {
        ret = annotationAxiom.getAnnotation().getValue() instanceof OWLLiteral
             && ((OWLLiteral) annotationAxiom.getAnnotation().getValue()).getLiteral().toLowerCase().equals("true");
      }
      else if (retirementMetaProperties.contains(property)) {
        ret = true;
      }
    }
    return ret;
  }
}
origin: owlcs/owlapi

.getOWLDeprecated(), fac.getOWLLiteral(true))));
origin: net.sourceforge.owlapi/owlapi-oboformat

.getOWLDeprecated(), fac.getOWLLiteral(true))));
origin: net.sourceforge.owlapi/owlapi-distribution

.getOWLDeprecated(), fac.getOWLLiteral(true))));
origin: net.sourceforge.owlapi/owlapi-osgidistribution

.getOWLDeprecated(), fac.getOWLLiteral(true))));
origin: edu.stanford.protege/org.protege.owl.diff

public boolean isDeprecated(OWLEntity e, DifferencePosition position) {
  OWLOntology ontology = position.getOntology(engine.getOwlDiffMap());
  for (OWLOntology ont : ontology.getImportsClosure()) {
    for (OWLAnnotation annotation : e.getAnnotations(ont, engine.getOWLDataFactory().getOWLDeprecated())) {
      if (!(annotation.getValue() instanceof OWLLiteral)) {
        continue;
      }
      OWLLiteral value = (OWLLiteral) annotation.getValue();
      if (!value.isBoolean()) {
        continue;
      }
      if (value.parseBoolean()) {
        return true;
      }
    }
  }
  return false;
}
origin: edu.stanford.protege/owl-diff-engine

public boolean isDeprecated(OWLEntity e, DifferencePosition position) {
  OWLOntology ontology = position.getOntology(engine.getOwlDiffMap());
  OWLAnnotationProperty deprecated = engine.getOWLDataFactory().getOWLDeprecated();
  for (OWLOntology ont : ontology.getImportsClosure()) {
    for (OWLAnnotation annotation : EntitySearcher.getAnnotations(e, ont, deprecated)) {
      if (!(annotation.getValue() instanceof OWLLiteral)) {
        continue;
      }
      OWLLiteral value = (OWLLiteral) annotation.getValue();
      if (!value.isBoolean()) {
        continue;
      }
      if (value.parseBoolean()) {
        return true;
      }
    }
  }
  return false;
}
origin: protegeproject/protege

public OWLModelManagerImpl() {
  super();
  manager = OntologyManagerFactory.createManager();
  manager.addOntologyChangeListener(this);
  objectRenderer = new OWLObjectRendererImpl(this);
  owlEntityRenderingCache = new OWLEntityRenderingCacheImpl();
  owlEntityRenderingCache.setOWLModelManager(this);
  owlObjectRenderingCache = new OWLObjectRenderingCache(this);
  owlExpressionCheckerFactory = new ManchesterOWLExpressionCheckerFactory(this);
  //needs to be initialized
  activeOntologiesStrategy = new ImportsClosureOntologySelectionStrategy(this);
  historyManager = new HistoryManagerImpl(this);
  owlReasonerManager = new OWLReasonerManagerImpl(this);
  owlReasonerManager.getReasonerPreferences().addListener(() -> fireEvent(EventType.ONTOLOGY_CLASSIFIED));
  deprecationCache = new DeprecationCache(manager.getOWLDataFactory().getOWLDeprecated());
  // force the renderer to be created
  // to prevent double cache rebuild once ontologies loaded
  getOWLEntityRenderer();
  put(OntologySourcesManager.ID, new OntologySourcesManager(this));
}
org.semanticweb.owlapi.modelOWLDataFactorygetOWLDeprecated

Javadoc

Gets an annotation property that has an IRI corresponding to owl:backwardCompatibleWith.

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
  • 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
  • getOWLObjectIntersectionOf,
  • getOWLEquivalentClassesAxiom,
  • getOWLObjectSomeValuesFrom,
  • getOWLNothing,
  • getOWLObjectComplementOf,
  • getOWLObjectPropertyAssertionAxiom,
  • getOWLAnnotationAssertionAxiom,
  • getOWLDataPropertyAssertionAxiom,
  • getOWLDatatype,
  • getOWLAnnotation

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top 17 Plugins for Android Studio
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