/** * Write prefix map. */ public void writePrefixMap() { ShortFormProvider sfp = getShortFormProvider(); if (!(sfp instanceof ManchesterOWLSyntaxPrefixNameShortFormProvider)) { return; } ManchesterOWLSyntaxPrefixNameShortFormProvider prov = (ManchesterOWLSyntaxPrefixNameShortFormProvider) sfp; Map<String, String> prefixMap = prov.getPrefixName2PrefixMap(); prefixMap.entrySet().stream().sorted((o1, o2) -> o1.getKey().compareTo(o2.getKey())) .forEach(value -> { write(PREFIX.toString()); write(": "); write(value.getKey()); write(" "); writeFullURI(value.getValue()); writeNewLine(); }); if (!prefixMap.isEmpty()) { writeNewLine(); writeNewLine(); } }
/** * Write prefix map. */ public void writePrefixMap() { ShortFormProvider sfp = getShortFormProvider(); if (!(sfp instanceof ManchesterOWLSyntaxPrefixNameShortFormProvider)) { return; } ManchesterOWLSyntaxPrefixNameShortFormProvider prov = (ManchesterOWLSyntaxPrefixNameShortFormProvider) sfp; Map<String, String> prefixMap = prov.getPrefixName2PrefixMap(); prefixMap.entrySet().stream().sorted((o1, o2) -> o1.getKey().compareTo(o2.getKey())) .forEach(value -> { write(PREFIX.toString()); write(": "); write(value.getKey()); write(" "); writeFullURI(value.getValue()); writeNewLine(); }); if (!prefixMap.isEmpty()) { writeNewLine(); writeNewLine(); } }
/** * Write prefix map. */ public void writePrefixMap() { ShortFormProvider sfp = getShortFormProvider(); if (!(sfp instanceof ManchesterOWLSyntaxPrefixNameShortFormProvider)) { return; } ManchesterOWLSyntaxPrefixNameShortFormProvider prov = (ManchesterOWLSyntaxPrefixNameShortFormProvider) sfp; Map<String, String> prefixMap = prov.getPrefixName2PrefixMap(); prefixMap.entrySet().stream().sorted((o1, o2) -> o1.getKey().compareTo(o2.getKey())) .forEach(value -> { write(PREFIX.toString()); write(": "); write(value.getKey()); write(" "); writeFullURI(value.getValue()); writeNewLine(); }); if (!prefixMap.isEmpty()) { writeNewLine(); writeNewLine(); } }
/** * Write prefix map. */ public void writePrefixMap() { ShortFormProvider sfp = getShortFormProvider(); if (!(sfp instanceof ManchesterOWLSyntaxPrefixNameShortFormProvider)) { return; } ManchesterOWLSyntaxPrefixNameShortFormProvider prov = (ManchesterOWLSyntaxPrefixNameShortFormProvider) sfp; Map<String, String> prefixMap = prov.getPrefixName2PrefixMap(); prefixMap.entrySet().stream().sorted((o1, o2) -> o1.getKey().compareTo(o2.getKey())) .forEach(value -> { write(PREFIX.toString()); write(": "); write(value.getKey()); write(" "); writeFullURI(value.getValue()); writeNewLine(); }); if (!prefixMap.isEmpty()) { writeNewLine(); writeNewLine(); } }
/** * Write ontology header. */ public void writeOntologyHeader() { event = new RendererEvent(this, o); fireFrameRenderingPrepared(ONTOLOGY.toString()); write(ONTOLOGY.toString()); write(":"); writeSpace(); if (!o.isAnonymous()) { int indent = getIndent(); writeFullURI(o.getOntologyID().getOntologyIRI().get().toString()); writeNewLine(); pushTab(indent); Optional<IRI> versionIRI = o.getOntologyID().getVersionIRI(); if (versionIRI.isPresent()) { writeFullURI(versionIRI.get().toString()); } popTab(); } fireFrameRenderingStarted(ONTOLOGY.toString()); writeNewLine(); o.importsDeclarations().sorted().forEach(this::writeImports); writeNewLine(); writeSection(ANNOTATIONS, o.annotations().iterator(), ",", true); fireFrameRenderingFinished(ONTOLOGY.toString()); }
/** * Write ontology header. */ public void writeOntologyHeader() { event = new RendererEvent(this, o); fireFrameRenderingPrepared(ONTOLOGY.toString()); write(ONTOLOGY.toString()); write(":"); writeSpace(); if (!o.isAnonymous()) { int indent = getIndent(); writeFullURI(o.getOntologyID().getOntologyIRI().get().toString()); writeNewLine(); pushTab(indent); Optional<IRI> versionIRI = o.getOntologyID().getVersionIRI(); if (versionIRI.isPresent()) { writeFullURI(versionIRI.get().toString()); } popTab(); } fireFrameRenderingStarted(ONTOLOGY.toString()); writeNewLine(); o.importsDeclarations().sorted().forEach(this::writeImports); writeNewLine(); writeSection(ANNOTATIONS, o.annotations().iterator(), ",", true); fireFrameRenderingFinished(ONTOLOGY.toString()); }
/** * Write ontology header. */ public void writeOntologyHeader() { event = new RendererEvent(this, o); fireFrameRenderingPrepared(ONTOLOGY.toString()); write(ONTOLOGY.toString()); write(":"); writeSpace(); if (!o.isAnonymous()) { int indent = getIndent(); writeFullURI(o.getOntologyID().getOntologyIRI().get().toString()); writeNewLine(); pushTab(indent); Optional<IRI> versionIRI = o.getOntologyID().getVersionIRI(); if (versionIRI.isPresent()) { writeFullURI(versionIRI.get().toString()); } popTab(); } fireFrameRenderingStarted(ONTOLOGY.toString()); writeNewLine(); o.importsDeclarations().sorted().forEach(this::writeImports); writeNewLine(); writeSection(ANNOTATIONS, o.annotations().iterator(), ",", true); fireFrameRenderingFinished(ONTOLOGY.toString()); }
/** * Write ontology header. */ public void writeOntologyHeader() { event = new RendererEvent(this, o); fireFrameRenderingPrepared(ONTOLOGY.toString()); write(ONTOLOGY.toString()); write(":"); writeSpace(); if (!o.isAnonymous()) { int indent = getIndent(); writeFullURI(o.getOntologyID().getOntologyIRI().get().toString()); writeNewLine(); pushTab(indent); Optional<IRI> versionIRI = o.getOntologyID().getVersionIRI(); if (versionIRI.isPresent()) { writeFullURI(versionIRI.get().toString()); } popTab(); } fireFrameRenderingStarted(ONTOLOGY.toString()); writeNewLine(); o.importsDeclarations().sorted().forEach(this::writeImports); writeNewLine(); writeSection(ANNOTATIONS, o.annotations().iterator(), ",", true); fireFrameRenderingFinished(ONTOLOGY.toString()); }
protected void writeImports(OWLImportsDeclaration decl) { fireSectionItemPrepared(IMPORT.toString()); write(IMPORT.toString()); write(":"); writeSpace(); fireSectionRenderingStarted(IMPORT.toString()); writeFullURI(decl.getIRI().toString()); writeNewLine(); fireSectionRenderingFinished(IMPORT.toString()); }
protected void writeImports(OWLImportsDeclaration decl) { fireSectionItemPrepared(IMPORT.toString()); write(IMPORT.toString()); write(":"); writeSpace(); fireSectionRenderingStarted(IMPORT.toString()); writeFullURI(decl.getIRI().toString()); writeNewLine(); fireSectionRenderingFinished(IMPORT.toString()); }
protected void writeImports(OWLImportsDeclaration decl) { fireSectionItemPrepared(IMPORT.toString()); write(IMPORT.toString()); write(":"); writeSpace(); fireSectionRenderingStarted(IMPORT.toString()); writeFullURI(decl.getIRI().toString()); writeNewLine(); fireSectionRenderingFinished(IMPORT.toString()); }
protected void writeImports(OWLImportsDeclaration decl) { fireSectionItemPrepared(IMPORT.toString()); write(IMPORT.toString()); write(":"); writeSpace(); fireSectionRenderingStarted(IMPORT.toString()); writeFullURI(decl.getIRI().toString()); writeNewLine(); fireSectionRenderingFinished(IMPORT.toString()); }