}
String clsIRI = ((OWLClass) cls).getIRI().toString();
if (IRI_CLASS_SYNONYMTYPEDEF.equals(clsIRI)) {
Frame f = getObodoc().getHeaderFrame();
Clause c = new Clause(OboFormatTag.TAG_SYNONYMTYPEDEF.getTag());
OWLNamedIndividual indv = (OWLNamedIndividual) ax.getIndividual();
String indvId = getIdentifier(indv);
// TODO: full specify this in the spec document.
// we may want to allow full IDs for subsets in future.
// here we would have a convention that an unprefixed
// subsetdef/synonymtypedef
// gets placed in a temp ID space, and only this id space is
// stripped
indvId = indvId.replaceFirst(".*:", "");
c.addValue(indvId);
c.addValue(indvId);
String nameValue = "";
String scopeValue = null;
for (OWLAnnotation ann : annotations(getOWLOntology()
.getAnnotationAssertionAxioms(indv.getIRI()))) {
String propId = ann.getProperty().getIRI().toString();
String value = ((OWLLiteral) ann.getValue()).getLiteral();
if (OWLRDFVocabulary.RDFS_LABEL.getIRI().toString()
.equals(propId)) {
nameValue = '"' + value + '"';
} else {
scopeValue = value;
}
}
c.addValue(nameValue);
if (scopeValue != null) {
c.addValue(scopeValue);
}
f.addClause(c);
} else if (IRI_CLASS_SUBSETDEF.equals(clsIRI)) {
Frame f = getObodoc().getHeaderFrame();
Clause c = new Clause(OboFormatTag.TAG_SUBSETDEF.getTag());
OWLNamedIndividual indv = (OWLNamedIndividual) ax.getIndividual();
String indvId = getIdentifier(indv);
// TODO: full specify this in the spec document.
// we may want to allow full IDs for subsets in future.
// here we would have a convention that an unprefixed
// subsetdef/synonymtypedef
// gets placed in a temp ID space, and only this id space is
// stripped
indvId = indvId.replaceFirst(".*:", "");
c.addValue(indvId);
String nameValue = "";
for (OWLAnnotation ann : annotations(getOWLOntology()
.getAnnotationAssertionAxioms(indv.getIRI()))) {
String propId = ann.getProperty().getIRI().toString();
String value = ((OWLLiteral) ann.getValue()).getLiteral();
if (OWLRDFVocabulary.RDFS_LABEL.getIRI().toString()
.equals(propId)) {
nameValue = '"' + value + '"';