/** * Gets the typedef frame. * * @param entity the entity * @return the typedef frame */ protected Frame getTypedefFrame(OWLEntity entity) { String id = getIdentifier(entity); return getTypedefFrame(checkNotNull(id)); }
/** * Gets the typedef frame. * * @param entity the entity * @return the typedef frame */ protected Frame getTypedefFrame(OWLEntity entity) { String id = getIdentifier(entity); return getTypedefFrame(checkNotNull(id)); }
/** * Gets the typedef frame. * * @param entity the entity * @return the typedef frame */ protected Frame getTypedefFrame(OWLEntity entity) { String id = getIdentifier(entity); return getTypedefFrame(checkNotNull(id)); }
/** * Gets the typedef frame. * * @param entity the entity * @return the typedef frame */ protected Frame getTypedefFrame(OWLEntity entity) { String id = getIdentifier(entity); return getTypedefFrame(checkNotNull(id)); }
protected Clause clause(OWLObjectProperty prop, @Nullable String tag, String value) { Frame f = getTypedefFrame(prop); if (OboFormatTag.TAG_ID.getTag().equals(tag)) { Clause clause = f.getClause(tag); assert clause != null; clause.setValue(value); return clause; } else { Clause clause = new Clause(tag, value); f.addClause(clause); return clause; } }
protected Clause clause(OWLObjectProperty prop, @Nullable String tag, String value) { Frame f = getTypedefFrame(prop); if (OboFormatTag.TAG_ID.getTag().equals(tag)) { Clause clause = f.getClause(tag); assert clause != null; clause.setValue(value); return clause; } else { Clause clause = new Clause(tag, value); f.addClause(clause); return clause; } }
protected Clause clause(OWLObjectProperty prop, @Nullable String tag, String value) { Frame f = getTypedefFrame(prop); if (OboFormatTag.TAG_ID.getTag().equals(tag)) { Clause clause = f.getClause(tag); assert clause != null; clause.setValue(value); return clause; } else { Clause clause = new Clause(tag, value); f.addClause(clause); return clause; } }
protected Clause clause(OWLObjectProperty prop, @Nullable String tag, String value) { Frame f = getTypedefFrame(prop); if (OboFormatTag.TAG_ID.getTag().equals(tag)) { Clause clause = f.getClause(tag); assert clause != null; clause.setValue(value); return clause; } else { Clause clause = new Clause(tag, value); f.addClause(clause); return clause; } }
/** * Tr object property. * * @param prop the prop * @param tag the tag * @param value the value * @param annotations the annotations * @return true, if successful */ protected boolean trObjectProperty(@Nullable OWLObjectProperty prop, String tag, @Nullable Boolean value, Stream<OWLAnnotation> annotations) { if (prop == null || value == null) { return false; } Frame f = getTypedefFrame(prop); Clause clause = new Clause(tag); clause.addValue(value); f.addClause(clause); addQualifiers(clause, annotations); return true; }
/** * Tr object property. * * @param prop the prop * @param tag the tag * @param value the value * @param annotations the annotations * @return true, if successful */ protected boolean trObjectProperty(@Nullable OWLObjectProperty prop, String tag, @Nullable Boolean value, Stream<OWLAnnotation> annotations) { if (prop == null || value == null) { return false; } Frame f = getTypedefFrame(prop); Clause clause = new Clause(tag); clause.addValue(value); f.addClause(clause); addQualifiers(clause, annotations); return true; }
/** * Tr object property. * * @param prop the prop * @param tag the tag * @param value the value * @param annotations the annotations * @return true, if successful */ protected boolean trObjectProperty(@Nullable OWLObjectProperty prop, String tag, @Nullable Boolean value, Stream<OWLAnnotation> annotations) { if (prop == null || value == null) { return false; } Frame f = getTypedefFrame(prop); Clause clause = new Clause(tag); clause.addValue(value); f.addClause(clause); addQualifiers(clause, annotations); return true; }
/** * Tr object property. * * @param prop the prop * @param tag the tag * @param value the value * @param annotations the annotations * @return true, if successful */ protected boolean trObjectProperty(@Nullable OWLObjectProperty prop, String tag, @Nullable Boolean value, Stream<OWLAnnotation> annotations) { if (prop == null || value == null) { return false; } Frame f = getTypedefFrame(prop); Clause clause = new Clause(tag); clause.addValue(value); f.addClause(clause); addQualifiers(clause, annotations); return true; }
private void addAltId(String replacedBy, String altId, boolean isClass, boolean isProperty) { Frame replacedByFrame = null; if (isClass) { replacedByFrame = getTermFrame(replacedBy); } else if (isProperty) { replacedByFrame = getTypedefFrame(replacedBy); } if (replacedByFrame != null) { boolean addClause = true; // check existing alt_ids to avoid duplicate clauses Collection<Clause> existing = replacedByFrame.getClauses(OboFormatTag.TAG_ALT_ID); for (Clause clause : existing) { if (altId.equals(clause.getValue(String.class))) { addClause = false; } } if (addClause) { replacedByFrame.addClause(new Clause(OboFormatTag.TAG_ALT_ID, altId)); } } }
private void addAltId(String replacedBy, String altId, boolean isClass, boolean isProperty) { Frame replacedByFrame = null; if (isClass) { replacedByFrame = getTermFrame(replacedBy); } else if (isProperty) { replacedByFrame = getTypedefFrame(replacedBy); } if (replacedByFrame != null) { boolean addClause = true; // check existing alt_ids to avoid duplicate clauses Collection<Clause> existing = replacedByFrame.getClauses(OboFormatTag.TAG_ALT_ID); for (Clause clause : existing) { if (altId.equals(clause.getValue(String.class))) { addClause = false; } } if (addClause) { replacedByFrame.addClause(new Clause(OboFormatTag.TAG_ALT_ID, altId)); } } }
private void addAltId(String replacedBy, String altId, boolean isClass, boolean isProperty) { Frame replacedByFrame = null; if (isClass) { replacedByFrame = getTermFrame(replacedBy); } else if (isProperty) { replacedByFrame = getTypedefFrame(replacedBy); } if (replacedByFrame != null) { boolean addClause = true; // check existing alt_ids to avoid duplicate clauses Collection<Clause> existing = replacedByFrame.getClauses(OboFormatTag.TAG_ALT_ID); for (Clause clause : existing) { if (altId.equals(clause.getValue(String.class))) { addClause = false; } } if (addClause) { replacedByFrame.addClause(new Clause(OboFormatTag.TAG_ALT_ID, altId)); } } }
private void addAltId(String replacedBy, String altId, boolean isClass, boolean isProperty) { Frame replacedByFrame = null; if (isClass) { replacedByFrame = getTermFrame(replacedBy); } else if (isProperty) { replacedByFrame = getTypedefFrame(replacedBy); } if (replacedByFrame != null) { boolean addClause = true; // check existing alt_ids to avoid duplicate clauses Collection<Clause> existing = replacedByFrame.getClauses(OboFormatTag.TAG_ALT_ID); for (Clause clause : existing) { if (altId.equals(clause.getValue(String.class))) { addClause = false; } } if (addClause) { replacedByFrame.addClause(new Clause(OboFormatTag.TAG_ALT_ID, altId)); } } }
protected void tr(OWLSubObjectPropertyOfAxiom ax) { OWLObjectPropertyExpression sup = ax.getSuperProperty(); OWLObjectPropertyExpression sub = ax.getSubProperty(); if (sub.isBottomEntity() || sub.isTopEntity() || sup.isBottomEntity() || sup .isTopEntity()) { error("SubProperties using Top or Bottom entites are not supported in OBO.", false); return; } if (sub.isOWLObjectProperty() && sup.isOWLObjectProperty()) { String supId = checkNotNull(getIdentifier(sup)); if (supId.startsWith("owl:")) { return; } Frame f = getTypedefFrame((OWLObjectProperty) sub); Clause clause = new Clause(OboFormatTag.TAG_IS_A, supId); f.addClause(clause); addQualifiers(clause, ax.annotations()); } else { error(ax, true); } }
protected void tr(OWLSubObjectPropertyOfAxiom ax) { OWLObjectPropertyExpression sup = ax.getSuperProperty(); OWLObjectPropertyExpression sub = ax.getSubProperty(); if (sub.isBottomEntity() || sub.isTopEntity() || sup.isBottomEntity() || sup .isTopEntity()) { error("SubProperties using Top or Bottom entites are not supported in OBO.", false); return; } if (sub.isOWLObjectProperty() && sup.isOWLObjectProperty()) { String supId = checkNotNull(getIdentifier(sup)); if (supId.startsWith("owl:")) { return; } Frame f = getTypedefFrame((OWLObjectProperty) sub); Clause clause = new Clause(OboFormatTag.TAG_IS_A, supId); f.addClause(clause); addQualifiers(clause, ax.annotations()); } else { error(ax, true); } }
protected void tr(OWLSubObjectPropertyOfAxiom ax) { OWLObjectPropertyExpression sup = ax.getSuperProperty(); OWLObjectPropertyExpression sub = ax.getSubProperty(); if (sub.isBottomEntity() || sub.isTopEntity() || sup.isBottomEntity() || sup .isTopEntity()) { error("SubProperties using Top or Bottom entites are not supported in OBO.", false); return; } if (sub.isOWLObjectProperty() && sup.isOWLObjectProperty()) { String supId = checkNotNull(getIdentifier(sup)); if (supId.startsWith("owl:")) { return; } Frame f = getTypedefFrame((OWLObjectProperty) sub); Clause clause = new Clause(OboFormatTag.TAG_IS_A, supId); f.addClause(clause); addQualifiers(clause, ax.annotations()); } else { error(ax, true); } }
protected void tr(OWLSubObjectPropertyOfAxiom ax) { OWLObjectPropertyExpression sup = ax.getSuperProperty(); OWLObjectPropertyExpression sub = ax.getSubProperty(); if (sub.isBottomEntity() || sub.isTopEntity() || sup.isBottomEntity() || sup .isTopEntity()) { error("SubProperties using Top or Bottom entites are not supported in OBO.", false); return; } if (sub.isOWLObjectProperty() && sup.isOWLObjectProperty()) { String supId = checkNotNull(getIdentifier(sup)); if (supId.startsWith("owl:")) { return; } Frame f = getTypedefFrame((OWLObjectProperty) sub); Clause clause = new Clause(OboFormatTag.TAG_IS_A, supId); f.addClause(clause); addQualifiers(clause, ax.annotations()); } else { error(ax, true); } }