IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java Discussion :

Requête SPARQL


Sujet :

Java

  1. #1
    Nouveau membre du Club
    Étudiant
    Inscrit en
    Décembre 2011
    Messages
    54
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Décembre 2011
    Messages : 54
    Points : 38
    Points
    38
    Par défaut Requête SPARQL
    Bonjour tout le monde ,

    J'utilise Jena TDB pour stocker mes triplets dans un triple store c'est bon je l'ai fais.

    Maintenant je dois faire des requêtes SPARQL pour l'insertion des nouveaux triplets mais j'ai eu un message d'erreur lors de l'exécution que voici:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    log4j:WARN No appenders could be found for logger (com.hp.hpl.jena.util.FileManager).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    Exception in thread "AWT-EventQueue-0" com.hp.hpl.jena.query.QueryParseException: Encountered " "." ". "" at line 1, column 86.
    Was expecting one of:
        "base" ...
        "prefix" ...
        "select" ...
        "describe" ...
        "construct" ...
        "ask" ...
     
    	at com.hp.hpl.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:102)
    	at com.hp.hpl.jena.sparql.lang.ParserSPARQL11.parse$(ParserSPARQL11.java:53)
    	at com.hp.hpl.jena.sparql.lang.Parser.parse(Parser.java:37)
    	at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:156)
    	at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:79)
    	at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:52)
    	at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
    	at project.gui.views.Form3$2$1.itemStateChanged(Form3.java:438)
    	at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
    	at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
    	at javax.swing.JComboBox.contentsChanged(Unknown Source)
    	at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
    	at javax.swing.DefaultComboBoxModel.setSelectedItem(Unknown Source)
    	at javax.swing.JComboBox.setSelectedItem(Unknown Source)
    	at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
    	at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source)
    	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    	at java.awt.Component.processMouseEvent(Unknown Source)
    	at javax.swing.JComponent.processMouseEvent(Unknown Source)
    	at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(Unknown Source)
    	at java.awt.Component.processEvent(Unknown Source)
    	at java.awt.Container.processEvent(Unknown Source)
    	at java.awt.Component.dispatchEventImpl(Unknown Source)
    	at java.awt.Container.dispatchEventImpl(Unknown Source)
    	at java.awt.Component.dispatchEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    	at java.awt.Container.dispatchEventImpl(Unknown Source)
    	at java.awt.Window.dispatchEventImpl(Unknown Source)
    	at java.awt.Component.dispatchEvent(Unknown Source)
    	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    	at java.awt.EventQueue.access$400(Unknown Source)
    	at java.awt.EventQueue$2.run(Unknown Source)
    	at java.awt.EventQueue$2.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    	at java.awt.EventQueue$3.run(Unknown Source)
    	at java.awt.EventQueue$3.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    	at java.awt.EventQueue.dispatchEvent(Unknown Source)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    	at java.awt.EventDispatchThread.run(Unknown Source)
    Quelqu'un saurait-il m'indiquer comment procéder

    Cordialament

  2. #2
    Nouveau membre du Club
    Étudiant
    Inscrit en
    Décembre 2011
    Messages
    54
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Décembre 2011
    Messages : 54
    Points : 38
    Points
    38
    Par défaut Nouvelle requête d'insertion
    bonjour tout le monde,

    voilà la requête d'insertion de mon programme
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    String NL = "\n" ;
    			    	 	    	String requete = "PREFIX onto: <http://www.semanticweb.org/ontologies/2010/9/MetaPatternOntology.owl#> \r"
    			                        +NL+"INSERT DATA {"
    			                        +NL+"    <http://www.semanticweb.org/ontologies/2010/9/MetaPatternOntology.owl#Identification>   a   onto:Identification;"
    			                        +NL+"        onto:Identifier onto:hasIdentifier " + table_1.getModel().getValueAt(0, 0) + "."
    			                        +NL+"        onto:Name onto:hasName " + table_1.getModel().getValueAt(0, 1) + "."
    			                        +NL+"        onto:Author onto:hasAuthor " + table_1.getModel().getValueAt(0, 2) + " ."
    			                        +NL+"}";
    mais j'ai encore un autre message d'erreur que voici
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Lexical error at line 4, column 55.  Encountered: "\n" (10), after : "montravail."
    Quelqu'un saurait-il m'indiquer comment procéder

    je suis bloquée et je sais comment y parvenir

    Merci pour votre aide

  3. #3
    Nouveau membre du Club
    Étudiant
    Inscrit en
    Décembre 2011
    Messages
    54
    Détails du profil
    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Décembre 2011
    Messages : 54
    Points : 38
    Points
    38
    Par défaut
    saurait il quelqu'un m'indiquer comment procéder? je suis encore bloqué

    Merci pour votre aide

Discussions similaires

  1. [Jena] Affichage du résultat d'une requête SPARQL dans une page JSP
    Par info_dekh dans le forum Frameworks
    Réponses: 1
    Dernier message: 18/06/2012, 11h54
  2. Requête SPARQL imbriquée
    Par maxime612001 dans le forum SPARQL
    Réponses: 2
    Dernier message: 27/04/2012, 15h11
  3. [Jena] Requête SPARQL sur une ontologie
    Par lalalala75 dans le forum Frameworks
    Réponses: 9
    Dernier message: 14/04/2012, 07h55
  4. Réponses: 1
    Dernier message: 18/03/2012, 09h59
  5. Interface graphique pour générer des requêtes SPARQL
    Par SonyBlack dans le forum SPARQL
    Réponses: 2
    Dernier message: 16/08/2010, 14h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo