Ejemplo 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);
    }
  }
Ejemplo n.º 2
0
 @Override
 public DataPropertyExpression createDataProperty(String uri) {
   DataPropertyExpression rd = new DataPropertyExpressionImpl(uri);
   if (!rd.isBottom() && !rd.isTop()) dataProperties.put(uri, rd);
   return rd;
 }