private void tr(OWLAsymmetricObjectPropertyAxiom ax){ OWLObjectPropertyExpression prop = ax.getProperty(); if(prop instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop, OboFormatTag.TAG_IS_ASYMMETRIC.getTag(), Boolean.TRUE, ax.getAnnotations()) ){ return; } } error(ax); }
private void tr(OWLFunctionalObjectPropertyAxiom ax){ OWLObjectPropertyExpression prop = ax.getProperty(); if(prop instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop, OboFormatTag.TAG_IS_FUNCTIONAL.getTag(), Boolean.TRUE, ax.getAnnotations()) ) { return; } } error(ax); }
private void tr(OWLReflexiveObjectPropertyAxiom ax){ OWLObjectPropertyExpression prop = ax.getProperty(); if(prop instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop, OboFormatTag.TAG_IS_REFLEXIVE.getTag(), Boolean.TRUE, ax.getAnnotations()) ) { return; } } error(ax); }
private void tr(OWLSymmetricObjectPropertyAxiom ax){ OWLObjectPropertyExpression prop = ax.getProperty(); if(prop instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop, OboFormatTag.TAG_IS_SYMMETRIC.getTag(), Boolean.TRUE, ax.getAnnotations()) ) { return; } } error(ax); }
private void tr(OWLTransitiveObjectPropertyAxiom ax){ OWLObjectPropertyExpression prop = ax.getProperty(); if(prop instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop, OboFormatTag.TAG_IS_TRANSITIVE.getTag(), Boolean.TRUE, ax.getAnnotations()) ) { return; } } error(ax); }
private void tr(OWLInverseFunctionalObjectPropertyAxiom ax){ OWLObjectPropertyExpression prop = ax.getProperty(); if(prop instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop, OboFormatTag.TAG_IS_INVERSE_FUNCTIONAL.getTag(), Boolean.TRUE, ax.getAnnotations()) ) { return; } } error(ax); } private void tr(OWLInverseObjectPropertiesAxiom ax){
private void tr(OWLInverseObjectPropertiesAxiom ax){ OWLObjectPropertyExpression prop1 = ax.getFirstProperty(); OWLObjectPropertyExpression prop2 = ax.getSecondProperty(); if(prop1 instanceof OWLObjectProperty && prop2 instanceof OWLObjectProperty){ if( trObjectProperty((OWLObjectProperty)prop1, OboFormatTag.TAG_INVERSE_OF.getTag(), this.getIdentifier(prop2), ax.getAnnotations()) ) { return; } } error(ax); }
private void trNaryPropertyAxiom(OWLNaryPropertyAxiom<OWLObjectPropertyExpression> ax, String tag){ Set<OWLObjectPropertyExpression> set = ax.getProperties(); if(set.size()>1){ boolean first = true; OWLObjectProperty prop = null; String disjointFrom = null; for(OWLObjectPropertyExpression ex: set){ if (ex.isBottomEntity() || ex.isTopEntity()) { error(tag+" using Top or Bottom entities are not supported in OBO.", ax); return; } if(first){ first = false; if(ex instanceof OWLObjectProperty) { prop = (OWLObjectProperty)ex; } }else{ disjointFrom = this.getIdentifier(ex); //getIdentifier(ex); } } if( trObjectProperty(prop, tag, disjointFrom, ax.getAnnotations()) ){ return; } } error(ax); }
private void tr(OWLObjectPropertyDomainAxiom ax){ final OWLClassExpression domain = ax.getDomain(); OWLObjectPropertyExpression propEx = ax.getProperty(); if (propEx.isAnonymous()) { error(ax); return; } OWLObjectProperty prop = propEx.asOWLObjectProperty(); if (domain.isBottomEntity() || domain.isTopEntity()) { // at least get the type def frame getTypedefFrame(prop); // now throw the error error("domains using top or bottom entities are not translatable to OBO.", ax); return; } String range = this.getIdentifier(domain); if(range != null){ if( trObjectProperty(prop, OboFormatTag.TAG_DOMAIN.getTag(), range, ax.getAnnotations()) ){ return; } } error(ax); }
private void tr(OWLObjectPropertyRangeAxiom ax){ final OWLClassExpression owlRange = ax.getRange(); OWLObjectPropertyExpression propEx = ax.getProperty(); if (propEx.isAnonymous()) { error(ax); } OWLObjectProperty prop = propEx.asOWLObjectProperty(); if (owlRange.isBottomEntity() || owlRange.isTopEntity()) { // at least create the property frame getTypedefFrame(prop); // error message error("ranges using top or bottom entities are not translatable to OBO.", ax); return; } String range = this.getIdentifier(owlRange); //getIdentifier(ax.getRange()); if(range != null){ if( trObjectProperty(prop, OboFormatTag.TAG_RANGE.getTag(), range, ax.getAnnotations()) ) { return; } } error(ax); }