Esempio n. 1
0
  @Override
  public void merge(ImmutableOntologyVocabulary v) {
    if (v instanceof OntologyVocabularyImpl) {
      OntologyVocabularyImpl vi = (OntologyVocabularyImpl) v;

      concepts.putAll(vi.concepts);
      objectProperties.putAll(vi.objectProperties);
      dataProperties.putAll(vi.dataProperties);
      annotationProperties.putAll(vi.annotationProperties);
    } else {
      for (OClass oc : v.getClasses())
        if (!oc.isTop() && !oc.isBottom()) concepts.put(oc.getName(), oc);
      for (ObjectPropertyExpression ope : v.getObjectProperties())
        if (!ope.isTop() && !ope.isBottom()) objectProperties.put(ope.getName(), ope);
      for (DataPropertyExpression dpe : v.getDataProperties())
        if (!dpe.isTop() && !dpe.isBottom()) dataProperties.put(dpe.getName(), dpe);
      for (AnnotationProperty ap : v.getAnnotationProperties())
        annotationProperties.put(ap.getName(), ap);
    }
  }
Esempio n. 2
0
 @Override
 public OClass createClass(String uri) {
   OClass cd = new ClassImpl(uri);
   if (!cd.isBottom() && !cd.isTop()) concepts.put(uri, cd);
   return cd;
 }