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

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

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

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

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSComment(), getOWLLiteral(value))}
 *
 * @param value The annotation value.
 * @return an rdfs:comment annotation with provided value
 */
default OWLAnnotation getRDFSComment(OWLAnnotationValue value) {
  return getOWLAnnotation(getRDFSComment(), value);
}
origin: net.sourceforge.owlapi/pellet-owlapi-ignazio1977

public static OWLAnnotationAssertionAxiom comment(OWLEntity entity, String comment) {
  return factory.getOWLAnnotationAssertionAxiom( entity.getIRI(), factory.getOWLAnnotation(
      factory.getOWLAnnotationProperty( OWLRDFVocabulary.RDFS_COMMENT.getIRI() ), 
      factory.getOWLLiteral( comment ) ) );
  
}
origin: owlcs/owlapi

  private OWLAnnotationAssertionAxiom convertToAnnotation(OWLNamedIndividual ind,
    OWLDataPropertyAssertionAxiom ax) {
    OWLDataProperty hasIRI = ax.getProperty().asOWLDataProperty();
    OWLAnnotation anno = df
      .getOWLAnnotation(df.getOWLAnnotationProperty(hasIRI), ax.getObject());
    return df.getOWLAnnotationAssertionAxiom(ind.getIRI(), anno);
  }
}
origin: protegeproject/protege

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

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSComment(), getOWLLiteral(value))}
 *
 * @param value The annotation value.
 * @return an rdfs:comment annotation with provided value
 */
default OWLAnnotation getRDFSComment(OWLAnnotationValue value) {
  return getOWLAnnotation(getRDFSComment(), value);
}
origin: net.sourceforge.owlapi/oboformat-included-owlapi

  private static void addVersion(OWLOntology ontology, String version, OWLOntologyManager manager){
    OWLDataFactory fac = manager.getOWLDataFactory();
    
    OWLAnnotationProperty ap = fac.getOWLAnnotationProperty( Obo2Owl.trTagToIRI(OboFormatTag.TAG_REMARK.getTag()));
    OWLAnnotation ann = fac.getOWLAnnotation(ap, fac.getOWLLiteral(version));
    
    OWLAxiom ax = fac.getOWLAnnotationAssertionAxiom(ontology.getOntologyID().getOntologyIRI(), ann);
    
    manager.applyChange(new AddAxiom(ontology, ax));

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

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSLabel(), getOWLLiteral(value), annotations)}
 *
 * @param value The annotation value.
 * @param annotations annotations
 * @return an rdfs:label annotation with provided value
 */
default OWLAnnotation getRDFSLabel(OWLAnnotationValue value,
  Stream<OWLAnnotation> annotations) {
  return getOWLAnnotation(getRDFSLabel(), value, annotations);
}
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: net.sourceforge.owlapi/owlapi-distribution

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

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSComment(), getOWLLiteral(value), annotations)}
 *
 * @param value The annotation value.
 * @param annotations annotations
 * @return an rdfs:comment annotation with provided value
 */
default OWLAnnotation getRDFSComment(String value, Stream<OWLAnnotation> annotations) {
  return getOWLAnnotation(getRDFSComment(), getOWLLiteral(value), annotations);
}
origin: owlcs/owlapi

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSLabel(), getOWLLiteral(value))}
 *
 * @param value The annotation value.
 * @return an rdfs:label annotation with provided value
 */
default OWLAnnotation getRDFSLabel(String value) {
  return getOWLAnnotation(getRDFSLabel(), getOWLLiteral(value));
}
origin: owlcs/owlapi

/**
 * Shorthand for
 * {@code getOWLAnnotation(getRDFSComment(), getOWLLiteral(value), annotations)}
 *
 * @param value The annotation value.
 * @param annotations annotations
 * @return an rdfs:comment annotation with provided value
 */
default OWLAnnotation getRDFSComment(String value, Stream<OWLAnnotation> annotations) {
  return getOWLAnnotation(getRDFSComment(), getOWLLiteral(value), annotations);
}
origin: edu.stanford.protege/org.protege.owl.server

@Override
public Object read(OWLInputStream in) throws IOException {
  OWLAnnotationProperty property = (OWLAnnotationProperty) in.read();
  OWLAnnotationValue value = (OWLAnnotationValue) in.read();
  return in.getOWLDataFactory().getOWLAnnotation(property, value);
}
origin: owlcs/owlapi

@Override
public OWLAnnotation visit(OWLAnnotation node) {
  return df.getOWLAnnotation(t(node.getProperty()), t(node.getValue()),
          node.annotations().map(this::t));
}
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: net.sourceforge.owlapi/owlapi

public void visit(OWLAnnotation node) {
  node.getProperty().accept(this);
  OWLAnnotationProperty prop = (OWLAnnotationProperty) obj;
  node.getValue().accept(this);
  OWLAnnotationValue val = (OWLAnnotationValue) obj;
  obj = dataFactory.getOWLAnnotation(prop, val);
}
origin: org.protege/protege-editor-owl

public OWLAnnotation getAnnotation() {
  OWLAnnotationProperty property = annotationPropertySelector.getSelectedObject();
  if (property != null){
    lastSelectedProperty = property;
    OWLDataFactory dataFactory = owlEditorKit.getModelManager().getOWLDataFactory();
    OWLAnnotationValue obj = getSelectedEditor().getEditedObject();
    if (obj != null) {
      return dataFactory.getOWLAnnotation(property, obj);
    }
  }
  return null;
}
origin: owlcs/owlapi

@Override
public Object visit(OWLAnnotation node) {
  return visit(node,
    () -> df.getOWLAnnotation(t(node.getProperty()), t(node.getValue()), t(node
      .annotations())));
}
org.semanticweb.owlapi.modelOWLDataFactorygetOWLAnnotation

Javadoc

Gets an annotation

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

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