protected void write(Stream<? extends OWLObject> objects, ManchesterOWLSyntax delimeter, boolean newline) { int tab = getIndent(); pushTab(tab); Iterator<? extends OWLObject> it = objects.iterator(); while (it.hasNext()) { it.next().accept(this); if (it.hasNext()) { if (newline && isUseWrapping()) { writeNewLine(); } write(delimeter); } } popTab(); }
protected void write(Stream<? extends OWLObject> objects, ManchesterOWLSyntax delimeter, boolean newline) { int tab = getIndent(); pushTab(tab); Iterator<? extends OWLObject> it = objects.iterator(); while (it.hasNext()) { it.next().accept(this); if (it.hasNext()) { if (newline && isUseWrapping()) { writeNewLine(); } write(delimeter); } } popTab(); }
protected void write(Stream<? extends OWLObject> objects, ManchesterOWLSyntax delimeter, boolean newline) { int tab = getIndent(); pushTab(tab); Iterator<? extends OWLObject> it = objects.iterator(); while (it.hasNext()) { it.next().accept(this); if (it.hasNext()) { if (newline && isUseWrapping()) { writeNewLine(); } write(delimeter); } } popTab(); }
protected void write(Stream<? extends OWLObject> objects, ManchesterOWLSyntax delimeter, boolean newline) { int tab = getIndent(); pushTab(tab); Iterator<? extends OWLObject> it = objects.iterator(); while (it.hasNext()) { it.next().accept(this); if (it.hasNext()) { if (newline && isUseWrapping()) { writeNewLine(); } write(delimeter); } } popTab(); }
protected void writeAnnotations(Iterator<OWLAnnotation> annoIt) { if (!annoIt.hasNext()) { return; } writeNewLine(); write(ANNOTATIONS.toString()); write(": "); pushTab(getIndent()); while (annoIt.hasNext()) { OWLAnnotation anno = annoIt.next(); anno.accept(this); if (annoIt.hasNext()) { write(", "); writeNewLine(); } } writeNewLine(); writeNewLine(); popTab(); }
protected void writeAnnotations(Iterator<OWLAnnotation> annoIt) { if (!annoIt.hasNext()) { return; } writeNewLine(); write(ANNOTATIONS.toString()); write(": "); pushTab(getIndent()); while (annoIt.hasNext()) { OWLAnnotation anno = annoIt.next(); anno.accept(this); if (annoIt.hasNext()) { write(", "); writeNewLine(); } } writeNewLine(); writeNewLine(); popTab(); }
protected void writeAnnotations(Iterator<OWLAnnotation> annoIt) { if (!annoIt.hasNext()) { return; } writeNewLine(); write(ANNOTATIONS.toString()); write(": "); pushTab(getIndent()); while (annoIt.hasNext()) { OWLAnnotation anno = annoIt.next(); anno.accept(this); if (annoIt.hasNext()) { write(", "); writeNewLine(); } } writeNewLine(); writeNewLine(); popTab(); }
protected void writeAnnotations(Iterator<OWLAnnotation> annoIt) { if (!annoIt.hasNext()) { return; } writeNewLine(); write(ANNOTATIONS.toString()); write(": "); pushTab(getIndent()); while (annoIt.hasNext()) { OWLAnnotation anno = annoIt.next(); anno.accept(this); if (annoIt.hasNext()) { write(", "); writeNewLine(); } } writeNewLine(); writeNewLine(); popTab(); }
private void writeRestriction(OWLQuantifiedObjectRestriction restriction, ManchesterOWLSyntax keyword) { restriction.getProperty().accept(this); write(keyword); boolean conjunctionOrDisjunction = false; if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { if (restriction.getFiller() instanceof OWLObjectIntersectionOf || restriction.getFiller() instanceof OWLObjectUnionOf) { conjunctionOrDisjunction = true; incrementTab(4); writeNewLine(); } write("("); } restriction.getFiller().accept(this); if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { write(")"); if (conjunctionOrDisjunction) { popTab(); } } }
private void writeRestriction(OWLQuantifiedObjectRestriction restriction, ManchesterOWLSyntax keyword) { restriction.getProperty().accept(this); write(keyword); boolean conjunctionOrDisjunction = false; if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { if (restriction.getFiller() instanceof OWLObjectIntersectionOf || restriction.getFiller() instanceof OWLObjectUnionOf) { conjunctionOrDisjunction = true; incrementTab(4); writeNewLine(); } write("("); } restriction.getFiller().accept(this); if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { write(")"); if (conjunctionOrDisjunction) { popTab(); } } }
private void writeRestriction(OWLQuantifiedObjectRestriction restriction, ManchesterOWLSyntax keyword) { restriction.getProperty().accept(this); write(keyword); boolean conjunctionOrDisjunction = false; if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { if (restriction.getFiller() instanceof OWLObjectIntersectionOf || restriction.getFiller() instanceof OWLObjectUnionOf) { conjunctionOrDisjunction = true; incrementTab(4); writeNewLine(); } write("("); } restriction.getFiller().accept(this); if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { write(")"); if (conjunctionOrDisjunction) { popTab(); } } }
private void writeRestriction(OWLQuantifiedObjectRestriction restriction, ManchesterOWLSyntax keyword) { restriction.getProperty().accept(this); write(keyword); boolean conjunctionOrDisjunction = false; if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { if (restriction.getFiller() instanceof OWLObjectIntersectionOf || restriction.getFiller() instanceof OWLObjectUnionOf) { conjunctionOrDisjunction = true; incrementTab(4); writeNewLine(); } write("("); } restriction.getFiller().accept(this); if (restriction.getFiller() instanceof OWLAnonymousClassExpression) { write(")"); if (conjunctionOrDisjunction) { popTab(); } } }
@Override public void visit(OWLLiteral node) { // xsd:decimal is the default datatype for literal forms like "33.3" // with no specified datatype if (XSDVocabulary.DECIMAL.getIRI().equals(node.getDatatype().getIRI())) { write(node.getLiteral()); } else if (node.getDatatype().isFloat()) { write(node.getLiteral()); write("f"); } else if (node.getDatatype().isInteger()) { write(node.getLiteral()); } else if (node.getDatatype().isBoolean()) { write(node.getLiteral()); } else { pushTab(getIndent()); writeLiteral(node.getLiteral()); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); node.getDatatype().accept(this); } popTab(); } }
@Override public void visit(OWLLiteral node) { // xsd:decimal is the default datatype for literal forms like "33.3" // with no specified datatype if (XSDVocabulary.DECIMAL.getIRI().equals(node.getDatatype().getIRI())) { write(node.getLiteral()); } else if (node.getDatatype().isFloat()) { write(node.getLiteral()); write("f"); } else if (node.getDatatype().isInteger()) { write(node.getLiteral()); } else if (node.getDatatype().isBoolean()) { write(node.getLiteral()); } else { pushTab(getIndent()); writeLiteral(node.getLiteral()); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); node.getDatatype().accept(this); } popTab(); } }
@Override public void visit(OWLLiteral node) { // xsd:decimal is the default datatype for literal forms like "33.3" // with no specified datatype if (XSDVocabulary.DECIMAL.getIRI().equals(node.getDatatype().getIRI())) { write(node.getLiteral()); } else if (node.getDatatype().isFloat()) { write(node.getLiteral()); write("f"); } else if (node.getDatatype().isInteger()) { write(node.getLiteral()); } else if (node.getDatatype().isBoolean()) { write(node.getLiteral()); } else { pushTab(getIndent()); writeLiteral(node.getLiteral()); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); node.getDatatype().accept(this); } popTab(); } }
@Override public void visit(OWLLiteral node) { // xsd:decimal is the default datatype for literal forms like "33.3" // with no specified datatype if (XSDVocabulary.DECIMAL.getIRI().equals(node.getDatatype().getIRI())) { write(node.getLiteral()); } else if (node.getDatatype().isFloat()) { write(node.getLiteral()); write("f"); } else if (node.getDatatype().isInteger()) { write(node.getLiteral()); } else if (node.getDatatype().isBoolean()) { write(node.getLiteral()); } else { pushTab(getIndent()); writeLiteral(node.getLiteral()); if (node.hasLang()) { write("@"); write(node.getLang()); } else if (!node.isRDFPlainLiteral() && !OWL2Datatype.XSD_STRING.matches(node.getDatatype())) { write("^^"); node.getDatatype().accept(this); } popTab(); } }