public Set<OWLAnnotationAssertionAxiom> getAllAnnotationAxiom(OWLClass cls) { Set<OWLAnnotationAssertionAxiom> axioms = new HashSet<>(); for (OWLAnnotation annotation : cls.getAnnotations(ontology)) { axioms.add(factory.getOWLAnnotationAssertionAxiom(cls.getIRI(), annotation)); } return axioms; }
public Set<OWLAnnotationAssertionAxiom> getAllAnnotationAxiom(OWLClass cls) { Set<OWLAnnotationAssertionAxiom> axioms = new HashSet<OWLAnnotationAssertionAxiom>(); for (OWLAnnotation annotation : cls.getAnnotations(ontology)) { axioms.add(factory.getOWLAnnotationAssertionAxiom(cls.getIRI(), annotation)); } return axioms; }
public Map<String, Set<String>> getAllDatabaseIds(OWLClass entity) { Map<String, Set<String>> dbAnnotations = new HashMap<>(); for (OWLAnnotation annotation : entity.getAnnotations(ontology)) { if (annotation.getValue() instanceof OWLLiteral) { OWLLiteral val = (OWLLiteral) annotation.getValue(); String value = val.getLiteral(); if (value.matches(DB_ID_PATTERN)) { String databaseName = value.replaceAll(DB_ID_PATTERN, "$1"); if (!dbAnnotations.containsKey(databaseName)) { dbAnnotations.put(databaseName, new HashSet<>()); } dbAnnotations.get(databaseName).add(value.replaceAll(DB_ID_PATTERN, "$2")); } } } return dbAnnotations; }
public Set<String> getDatabaseIds(OWLClass entity) { Set<String> dbAnnotations = new HashSet<>(); for (OWLAnnotation annotation : entity.getAnnotations(ontology)) { if (annotation.getValue() instanceof OWLLiteral) { OWLLiteral val = (OWLLiteral) annotation.getValue(); String value = val.getLiteral(); if (value.matches(DB_ID_PATTERN)) { dbAnnotations.add(value); } } } return dbAnnotations; }
public Map<String, Set<String>> getAllDatabaseIds(OWLClass entity) { Map<String, Set<String>> dbAnnotations = new HashMap<String, Set<String>>(); for (OWLAnnotation annotation : entity.getAnnotations(ontology)) { if (annotation.getValue() instanceof OWLLiteral) { OWLLiteral val = (OWLLiteral) annotation.getValue(); String value = val.getLiteral().toString(); if (value.matches(DB_ID_PATTERN)) { String databaseName = value.replaceAll(DB_ID_PATTERN, "$1"); if (!dbAnnotations.containsKey(databaseName)) { dbAnnotations.put(databaseName, new HashSet<String>()); } dbAnnotations.get(databaseName).add(value.replaceAll(DB_ID_PATTERN, "$2")); } } } return dbAnnotations; }
public synchronized Map<IProperty, String> getAnnotations() { HashMap<IProperty, String> ret = new HashMap<>(); if (getOntology() == null) return ret; for (OWLAnnotation annotation : _owl .getAnnotations(getOntology().ontology)) { OWLLiteral l = (OWLLiteral) annotation.getValue(); ret.put(new Property(annotation.getProperty(), _manager, _manager .getConceptSpace(annotation.getProperty().getIRI())), l .getLiteral()); } return ret; }
private Label getLabel (OWLClass c, OWLOntology ont) { Label classLabel = new Label(null, null); for (OWLAnnotation annotation : c.getAnnotations(ont, this.dataFactory.getRDFSLabel())) { if (annotation.getValue() instanceof OWLLiteral) { OWLLiteral val = (OWLLiteral) annotation.getValue(); classLabel.setText(val.getLiteral().replace("'", "\\'")); classLabel.setLang(val.getLang()); } } return classLabel; }