Search in sources :

Example 6 with SKOSDocumentation

use of skos.SKOSDocumentation in project opentheso by miledrousset.

the class SkosToJsonld method addDocumentations.

private void addDocumentations(ArrayList<SKOSDocumentation> documentations) {
    ArrayList<SKOSDocumentation> changeNote = new ArrayList<>();
    ArrayList<SKOSDocumentation> definition = new ArrayList<>();
    ArrayList<SKOSDocumentation> editorialNote = new ArrayList<>();
    ArrayList<SKOSDocumentation> example = new ArrayList<>();
    ArrayList<SKOSDocumentation> historyNote = new ArrayList<>();
    ArrayList<SKOSDocumentation> note = new ArrayList<>();
    ArrayList<SKOSDocumentation> scopeNote = new ArrayList<>();
    for (SKOSDocumentation sKOSDocumentation : documentations) {
        switch(sKOSDocumentation.getProperty()) {
            case SKOSProperty.changeNote:
                changeNote.add(sKOSDocumentation);
                break;
            case SKOSProperty.definition:
                definition.add(sKOSDocumentation);
                break;
            case SKOSProperty.editorialNote:
                editorialNote.add(sKOSDocumentation);
                break;
            case SKOSProperty.example:
                example.add(sKOSDocumentation);
                break;
            case SKOSProperty.historyNote:
                historyNote.add(sKOSDocumentation);
                break;
            case SKOSProperty.note:
                note.add(sKOSDocumentation);
                break;
            case SKOSProperty.scopeNote:
                scopeNote.add(sKOSDocumentation);
                break;
            default:
                break;
        }
    }
    addNote(changeNote, "changeNote");
    addNote(definition, "definition");
    addNote(editorialNote, "editorialNote");
    addNote(example, "example");
    addNote(historyNote, "historyNote");
    addNote(note, "note");
    addNote(scopeNote, "scopeNote");
}
Also used : SKOSDocumentation(skos.SKOSDocumentation) ArrayList(java.util.ArrayList)

Aggregations

SKOSDocumentation (skos.SKOSDocumentation)6 ArrayList (java.util.ArrayList)3 NodeNote (mom.trd.opentheso.bdd.helper.nodes.notes.NodeNote)2 HttpURLConnection (java.net.HttpURLConnection)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 NodeAlignment (mom.trd.opentheso.bdd.helper.nodes.NodeAlignment)1 StringPlus (mom.trd.opentheso.bdd.tools.StringPlus)1 ReadFileSKOS (mom.trd.opentheso.core.imports.old.ReadFileSKOS)1 SAXException (org.xml.sax.SAXException)1 SKOSLabel (skos.SKOSLabel)1 SKOSResource (skos.SKOSResource)1 SKOSXmlDocument (skos.SKOSXmlDocument)1