Précédent   Forum du club des développeurs et IT Pro > Webmasters - Développement Web > Web sémantique
Web sémantique Forum d'entraide sur le Web sémantique (ajout de contenu sémantique - RDFa, microformats, microdonnées... -, ontologies - OWL, OWL2... - et utilisation - SPARQL, Jena...)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 17/05/2012, 06h03   #1
helabah
Invité régulier
 
Femme
Étudiant
Inscription : mai 2012
Messages : 31
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Matériel informatique

Informations forums :
Inscription : mai 2012
Messages : 31
Points : 6
Points : 6
Par défaut Récupérer les données d'une ontologie

je veux récupérer les instances de mon ontologie mais je suis tombé sur ce message d'erreur.
Code :
1
2
3
4
5
Exception in thread "main" com.hp.hpl.jena.shared.NotFoundException: Not found: C:/Program20%Files/Protege_3.4.7/examples/Krs1.owl
	at com.hp.hpl.jena.util.FileManager.readModelWorker(FileManager.java:378)
	at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:332)
	at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:316)
	at conn.RecupererOrdonActivites.main(RecupererOrdonActivites.java:29)
merci pour vos aides.
helabah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/05/2012, 12h41   #2
Sapience
Membre chevronné
 
Avatar de Sapience
 
Homme Thomas Francart
Consultant sémantique & data à sparna.fr
Inscription : avril 2005
Messages : 191
Détails du profil
Informations personnelles :
Nom : Homme Thomas Francart
Localisation : France, Paris (Île de France)

Informations professionnelles :
Activité : Consultant sémantique & data à sparna.fr
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : avril 2005
Messages : 191
Points : 685
Points : 685
Code :
Not found: C:/Program20%Files/Protege_3.4.7/examples/Krs1.owl
Le chemin vers le fichier n'est pas bon. Vérifie-le, il n'y a pas de fichier à cet endroit-là. Fais attention à l'espace dans "Program Files", il faut sans doute l'encoder "Program%20Files"
Sapience est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/05/2012, 16h49   #3
helabah
Invité régulier
 
Femme
Étudiant
Inscription : mai 2012
Messages : 31
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Matériel informatique

Informations forums :
Inscription : mai 2012
Messages : 31
Points : 6
Points : 6
Merci pour votre réponse Sapience.
c'est bon pour le problème "not found" je l'ai résolus , reste toujours le problème du main
Exception in thread "main" java.lang.Error: Unresolved compilation problem:

at conn.Recupererinstance.main(Recupererinstance.java:21)

merci
helabah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/05/2012, 19h41   #4
Sapience
Membre chevronné
 
Avatar de Sapience
 
Homme Thomas Francart
Consultant sémantique & data à sparna.fr
Inscription : avril 2005
Messages : 191
Détails du profil
Informations personnelles :
Nom : Homme Thomas Francart
Localisation : France, Paris (Île de France)

Informations professionnelles :
Activité : Consultant sémantique & data à sparna.fr
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : avril 2005
Messages : 191
Points : 685
Points : 685
Code :
1
2
3
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
 
	at conn.Recupererinstance.main(Recupererinstance.java:21)
Tu as un problème de compilation. C'est purement un problème java. Regarde ton code et essaie de comprendre ce qui ne va pas. Si tu dois poser une question c'est dans le forum java.
Sapience est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/05/2012, 21h13   #5
helabah
Invité régulier
 
Femme
Étudiant
Inscription : mai 2012
Messages : 31
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Matériel informatique

Informations forums :
Inscription : mai 2012
Messages : 31
Points : 6
Points : 6
ok merci, SVP Mr Sapience. voici une requête
Code :
1
2
3
4
5
6
String queryString=  "PREFIX reuses: <http://www.owl-ontologies.com/reuses.owl#>"+ 
	"SELECT ?hasnameactivite " +
	"WHERE " +
	"{ " +
	"?Activite reuses:hasnameactivite" +
	"} ";
quand j'ai compiler
Code :
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
Exception in thread "main" com.hp.hpl.jena.query.QueryParseException: Encountered "}" at line 1, column 123.
Was expecting one of:
    <IRIref> ...
    <PNAME_NS> ...
    <PNAME_LN> ...
    <BLANK_NODE_LABEL> ...
    <VAR1> ...
    <VAR2> ...
    "true" ...
    "false" ...
    <INTEGER> ...
    <DECIMAL> ...
    <DOUBLE> ...
    <INTEGER_POSITIVE> ...
    <DECIMAL_POSITIVE> ...
    <DOUBLE_POSITIVE> ...
    <INTEGER_NEGATIVE> ...
    <DECIMAL_NEGATIVE> ...
    <DOUBLE_NEGATIVE> ...
    <STRING_LITERAL1> ...
    <STRING_LITERAL2> ...
    <STRING_LITERAL_LONG1> ...
    <STRING_LITERAL_LONG2> ...
    "(" ...
    <NIL> ...
    "[" ...
    <ANON> ...
 
	at com.hp.hpl.jena.sparql.lang.ParserSPARQL.perform(ParserSPARQL.java:88)
	at com.hp.hpl.jena.sparql.lang.ParserSPARQL.parse(ParserSPARQL.java:38)
	at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:125)
	at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:72)
	at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:43)
	at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:31)
	at conn.requettest.main(requettest.java:56)
je ne trouve pas l'erreur. merci
helabah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/05/2012, 22h27   #6
CesarR
Membre habitué
 
Homme
Inscription : juillet 2005
Messages : 82
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Etats-Unis

Informations forums :
Inscription : juillet 2005
Messages : 82
Points : 105
Points : 105
Envoyer un message via MSN à CesarR
Il manque une variable dans ton WHERE.

Chaque ligne doit representer un triplet du style :X :Y :Z. Dans ton cas tu as seulement :X et :Y avec :X = ?Activite et :Y = reuses:hasnameactivite.

Edit: De plus tu SELECT ?hasnameactivite qui n'existe pas dans ton WHERE. J'imagine que tu voulais faire:

Code :
1
2
3
4
5
6
PREFIX reuses: <http://www.owl-ontologies.com/reuses.owl#>
SELECT ?hasnameactivite 
WHERE 
{
?Activite reuses:hasnameactivite ?hasnameactivite.
}
CesarR est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 18/05/2012, 05h42   #7
helabah
Invité régulier
 
Femme
Étudiant
Inscription : mai 2012
Messages : 31
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : High Tech - Matériel informatique

Informations forums :
Inscription : mai 2012
Messages : 31
Points : 6
Points : 6
Merci, c'est une faute d'inattention .
helabah est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Cette discussion est résolue.
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 02h17.


 
 
 
 
Partenaires

Hébergement Web