congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
OWLDataFactory.getOWLAnnotationProperty
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: owlcs/owlapi

  @Override
  @Nullable
  public OWLAnnotationProperty getOWLAnnotationProperty(String name) {
    if (annotationPropertyNames.contains(name)) {
      return df.getOWLAnnotationProperty(getIRI(name));
    }
    return null;
  }
}
origin: owlcs/owlapi

private void translateAsAnnotationPropertyRange(IRI s, IRI p, IRI o) {
  OWLAnnotationProperty prop = df.getOWLAnnotationProperty(s);
  add(df.getOWLAnnotationPropertyRangeAxiom(prop, o, anns()));
  consume(s, p, o);
}
origin: com.github.ansell.owlapi/owlapi-parsers

final public OWLAnnotationProperty AnnotationPropertyIRI() throws ParseException {
  IRI iri;
  iri = IRI();
  return dataFactory.getOWLAnnotationProperty(iri);
}
origin: protegeproject/protege

@Nonnull
@Override
public Optional<OWLAxiom> visit(@Nonnull OWLAnnotationProperty property) {
  return strategy.getDeprecatedAnnotationPropertyParentIri()
          .map(parent -> dataFactory.getOWLSubAnnotationPropertyOfAxiom(property, dataFactory.getOWLAnnotationProperty(parent)));
}
origin: edu.stanford.protege/protege-editor-owl

  public Optional<OWLAnnotation> getAnnotation(OWLDataFactory dataFactory) {
    Optional<OWLAnnotationValue> annotationValue = annotationValueProvider.getAnnotationValue(dataFactory);
    return annotationValue.map(v -> {
          IRI iri = annotationPropertyIriProvider.get();
          OWLAnnotationProperty property = dataFactory.getOWLAnnotationProperty(iri);
          return dataFactory.getOWLAnnotation(property, annotationValue.get());
        }
    );
  }
}
origin: owlcs/owlapi

private static Set<OWLAnnotationProperty> getProperties(OWLDataFactory factory,
  OboFormatTag... tags) {
  Set<OWLAnnotationProperty> set = new HashSet<>();
  for (OboFormatTag tag : tags) {
    set.add(factory.getOWLAnnotationProperty(OWLAPIObo2Owl.trTagToIRI(tag.getTag())));
  }
  return set;
}
origin: com.github.ansell.owlapi/owlapi-parsers

private OWLAnnotationProperty getOWLAnnotationProperty(String name) {
  OWLAnnotationProperty prop = owlEntityChecker.getOWLAnnotationProperty(name);
  if (prop == null && annotationPropertyNames.contains(name)) {
    prop = dataFactory.getOWLAnnotationProperty(getIRI(name));
  }
  return prop;
}
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: owlcs/owlapi

/**
 * Tr annotation prop.
 *
 * @param relId the rel id
 * @return the oWL annotation property
 */
protected OWLAnnotationProperty trAnnotationProp(String relId) {
  return fac.getOWLAnnotationProperty(oboIdToIRI(mapPropId(relId)));
}
origin: owlcs/owlapi

@Override
public boolean containsAnnotationPropertyInSignature(IRI iri, Imports imports) {
  boolean result =
    imports.stream(this).anyMatch(o -> o.containsAnnotationPropertyInSignature(iri));
  if (result) {
    return result;
  }
  return checkOntologyAnnotations(df.getOWLAnnotationProperty(iri));
}
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: net.sourceforge.owlapi/owlapi-osgidistribution

  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

protected void expandAssertions(OWLOntology o, OWLAnnotationProperty p) {
  OWLAnnotationProperty ap425 = df.getOWLAnnotationProperty(IRI_IAO_0000425.getIRI());
  getAnnotationObjects(p, o.importsClosure(), ap425).map(a -> a.getValue().asLiteral())
    .filter(v -> v.isPresent())
    .forEach(v -> {
      String str = v.get().getLiteral();
      LOG.info("assertion mapping {} to {}", p, str);
      expandAssertionToMap.put(p.getIRI(), str);
    });
}
origin: edu.stanford.protege/protege-editor-owl

public OWLAnnotationProperty getPreferredLabel() {
  final List<IRI> iris = OWLRendererPreferences.getInstance().getAnnotationIRIs();
  IRI iri = iris.isEmpty() ? OWLRDFVocabulary.RDFS_LABEL.getIRI() : iris.get(0);
  return mngr.getOWLDataFactory().getOWLAnnotationProperty(iri);
}
origin: owlcs/owlapi

private OWLAnnotationProperty getOWLAnnotationProperty(String name) {
  OWLAnnotationProperty prop = checker.getOWLAnnotationProperty(name);
  if (prop == null && annotationPropertyNames.contains(name)) {
    prop = df.getOWLAnnotationProperty(getIRI(name));
  }
  if (prop == null) {
    throw new ExceptionBuilder().withAnn().build();
  }
  return prop;
}
origin: protegeproject/protege

private void addDeprecationCode(List<OWLOntologyChange> changes) {
  profile.getDeprecationCode().ifPresent(deprecationCode -> {
    info.getDeprecationCode().ifPresent(selectedCode -> {
      OWLAnnotationAxiom ax = dataFactory.getOWLAnnotationAssertionAxiom(
          dataFactory.getOWLAnnotationProperty(deprecationCode.getPropertyIri()),
          info.getEntityToDeprecate().getIRI(),
          selectedCode
      );
      changes.add(new AddAxiom(getHomeOntology(), ax));
    });
  });
}
origin: owlcs/owlapi

private static void generateChanges(OWLOntologyManager ontologyManager, OWLOntology o,
  ShortFormProvider provider,
  IRI annotationIRI, @Nullable String lang) {
  OWLDataFactory df = ontologyManager.getOWLDataFactory();
  OWLAnnotationProperty ap = df.getOWLAnnotationProperty(annotationIRI);
  new ImportsStructureEntitySorter(o).getObjects().forEach((ont, ent) -> ent.forEach(e -> {
    if (o.containsEntityInSignature(e)) {
      ont.add(df.getOWLAnnotationAssertionAxiom(ap, e.getIRI(),
        action(e, lang, provider, df)));
    }
  }));
}
origin: net.sourceforge.owlapi/owlapi-distribution

  @Override
  public void handleTriple(IRI s, IRI p, IRI o) {
    if (!isAnon(s)) {
      OWLAnnotationProperty property = df.getOWLAnnotationProperty(s);
      add(df.getOWLDeclarationAxiom(property, anns()));
      consume(s, p, o);
    }
    addAp(s, true);
  }
}
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) {
    HasIRI subject = getConsumer().getCurrentEntity();
    OWLAnnotationProperty property = getDataFactory()
      .getOWLAnnotationProperty(OBOVocabulary.ALT_ID);
    IRI object = getIRIFromOBOId(value);
    OWLAnnotationAssertionAxiom ax = getDataFactory()
      .getOWLAnnotationAssertionAxiom(property, subject.getIRI(),
        object);
    applyChange(new AddAxiom(getOntology(), ax));
  }
}
org.semanticweb.owlapi.modelOWLDataFactorygetOWLAnnotationProperty

Javadoc

Gets an OWLAnnotationProperty 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

  • 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
  • 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
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • String (java.lang)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Top PhpStorm plugins
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