Search in sources :

Example 6 with SKOSDocumentation

use of mom.trd.opentheso.skosapi.SKOSDocumentation in project opentheso by miledrousset.

the class ImportCandidatsTest method getNotes.

// 30 = definition, 34 = editorialNote, 36= Note, 74= Terme spécifique, 72= Terme générique,
private String getNotes(SKOSResource sKOSResource) {
    String notes = "";
    String propriete = "";
    for (SKOSDocumentation sDocumentation : sKOSResource.getDocumentationsList()) {
        if (!sDocumentation.getText().isEmpty()) {
            /*    if(sDocumentation.getProperty() == SKOSProperty.definition)//30)
                    propriete = "definition";
                if(sDocumentation.getProperty() == SKOSProperty.editorialNote) //34)
                    propriete = "editorialNote";
                if(sDocumentation.getProperty() == SKOSProperty.note)//36)
                    propriete = "Note";*/
            if (sDocumentation.getProperty() == SKOSProperty.changeNote) {
                if (notes.isEmpty())
                    notes = sDocumentation.getText();
                else
                    notes = notes + " ####  " + sDocumentation.getText();
            }
        }
    }
    /*     for (SKOSMatch sKOSMatch : sKOSResource.getMatchList()) {
            if(sKOSMatch.getValue().contains("https://ark.frantiq.fr")) {    
                if(sKOSMatch.getProperty() == 74)
                    propriete = "Terme spécifique";
                if(sKOSMatch.getProperty() == 72)
                    propriete = "Terme générique";
                  
                if(notes.isEmpty())
                    notes = propriete + "--> " + sKOSMatch.getValue();
                else 
                    notes = notes + " ####  " + propriete + "--> " + sKOSMatch.getValue();   
            }
        }*/
    return notes;
}
Also used : SKOSDocumentation(mom.trd.opentheso.skosapi.SKOSDocumentation)

Aggregations

SKOSDocumentation (mom.trd.opentheso.skosapi.SKOSDocumentation)6 SKOSLabel (mom.trd.opentheso.skosapi.SKOSLabel)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 ArrayList (java.util.ArrayList)2 DownloadBean (mom.trd.opentheso.SelectedBeans.DownloadBean)2 ReadRdf4j (mom.trd.opentheso.core.imports.rdf4j.ReadRdf4j)2 SKOSResource (mom.trd.opentheso.skosapi.SKOSResource)2 SKOSXmlDocument (mom.trd.opentheso.skosapi.SKOSXmlDocument)2 Chunk (com.itextpdf.text.Chunk)1 Paragraph (com.itextpdf.text.Paragraph)1 NodeAlignment (mom.trd.opentheso.bdd.helper.nodes.NodeAlignment)1 NodeNote (mom.trd.opentheso.bdd.helper.nodes.notes.NodeNote)1 SelectedResource (mom.trd.opentheso.core.alignment.SelectedResource)1 SKOSGPSCoordinates (mom.trd.opentheso.skosapi.SKOSGPSCoordinates)1 SKOSMatch (mom.trd.opentheso.skosapi.SKOSMatch)1 SKOSRelation (mom.trd.opentheso.skosapi.SKOSRelation)1 Literal (org.eclipse.rdf4j.model.Literal)1