Jar of the created builtins

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Jar of the created builtins

Fatma ELLOUZE
Hello All,
Once the jar file is created which contains the definition of methods for the user builtins, where can I put it?
I placed it in the plugin folder. Is it true?
In fact, each time I write a rule that contain a user defined builtin, the status of the rule is returned to "Invalid SWRL atom predicate" knowing that I have a prefix named myBuiltins that contains instances of the class swrl:builtin
PS: here is the rule: Depth(?x) ^ Has_Value_Depth(?x, ?y) ^ swrlb:lessThan(?y, 50) ^ Length(?z) ^ Has_Value_Length(?z, ?a) ^ swrlb:lessThan(?a, 10) ^ Technique_of_Installation(?b) ^ Has_Value_Technique_of_Installation(?b, ?c) ^ swrlb:stringEqualIgnoreCase(?c, "Floating") ^ Substance_Carried(?d) ^ Has_Value_Substance(?d, ?e) ^ swrlb:stringEqualIgnoreCase(?e, "Water") -> sqwrl:select(?x)  myBuiltins:Return_Ass1(?y, ?a)
Thank you for your clarification
Best regards
Fatma
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Lorenz Buehmann
The JAR file has to be put into the classpath of Protege. And see [1] for more infos.

[1] https://github.com/protegeproject/swrlapi/wiki/SWRLBuiltInBridge#Defining_BuiltIns_in_OWL

Hello All,
Once the jar file is created which contains the definition of methods for
the user builtins, where can I put it?
I placed it in the plugin folder. Is it true?
In fact, each time I write a rule that contain a user defined builtin, the
status of the rule is returned to "Invalid SWRL atom predicate" knowing that
I have a prefix named myBuiltins that contains instances of the class
swrl:builtin
PS: here is the rule: *Depth(?x) ^ Has_Value_Depth(?x, ?y) ^
swrlb:lessThan(?y, 50) ^ Length(?z) ^ Has_Value_Length(?z, ?a) ^
swrlb:lessThan(?a, 10) ^ Technique_of_Installation(?b) ^
Has_Value_Technique_of_Installation(?b, ?c) ^
swrlb:stringEqualIgnoreCase(?c, "Floating") ^ Substance_Carried(?d) ^
Has_Value_Substance(?d, ?e) ^ swrlb:stringEqualIgnoreCase(?e, "Water") ->
sqwrl:select(?x)  myBuiltins:Return_Ass1(?y, ?a)*
Thank you for your clarification
Best regards
Fatma



--
View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029.html
Sent from the Protege User mailing list archive at Nabble.com.
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Fatma ELLOUZE
Thank you Mr Lorenz for your reply.
I see that link but I don't understand how to put into the classpath of Protege. Already I search for this word in Protege and I didn't find it. There is only library and in the library, it accepts only owl file and not jar file.
Thank you for your help
kind regards
fatma
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Martin O'Connor-2

In Protege 5.0.0 putting the JAR in the plugins directory will ensure that it is in the class path at runtime.

This will be something like

<Protégé Install Directory>/Contents/Java/plugins

Martin

> On Jul 30, 2016, at 8:33 AM, Fatma ELLOUZE <[hidden email]> wrote:
>
> Thank you Mr Lorenz for your reply.
> I see that link but I don't understand how to put into the classpath of
> Protege. Already I search for this word in Protege and I didn't find it.
> There is only library and in the library, it accepts only owl file and not
> jar file.
> Thank you for your help
> kind regards
> fatma
>
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029p4666032.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Fatma ELLOUZE
Ok thank you Mr Martin for your reply, but I am sorry if I don't understand yet. Indeed, because my Protege 5.0.0 folder does not contain  "/Contents/Java/plugins". here is a figure that shows what my folders of Protege and plugin contain:


Thank you for your help
Best regards
fatma
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Martin O'Connor-2

On Windows the location appears to be different. The directory you pointed to is the correct one for the built-ins JAR. Does it now work?

Martin

> On Aug 1, 2016, at 4:28 AM, Fatma ELLOUZE <[hidden email]> wrote:
>
> Ok thank you Mr Martin for your reply, but I am sorry if I don't understand
> yet. Indeed, because my Protege 5.0.0 folder does not contain
> "/Contents/Java/plugins". here is a figure that shows what my folders of
> Protege and plugin contain:
> <http://protege-project.136.n4.nabble.com/file/n4666044/Sans_cccitre.png>
>
> Thank you for your help
> Best regards
> fatma
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029p4666044.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Fatma ELLOUZE
Unfortunately, it does not work. In fact when I write my rules there is always an error that says that there is no this jar, even the prefix of the ontology that contains my builtins is not recognized. I have been really blocked since the previous month in this problem of builtins.
Please, if there is a help I am very grateful.
Thank you for this forum and for who reply.
Best regards
fatma
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Martin O'Connor-2

There appears to be a bug in the current 1.0.10 that causes it to ignore user-defined built-ins. I will fix the bug in the next few days.

Martin


> On Aug 1, 2016, at 9:59 AM, Fatma ELLOUZE <[hidden email]> wrote:
>
> Unfortunately, it does not work. In fact when I write my rules there is
> always an error that says that there is no this jar, even the prefix of the
> ontology that contains my builtins is not recognized. I have been really
> blocked since the previous month in this problem of builtins.
> Please, if there is a help I am very grateful.
> Thank you for this forum and for who reply.
> Best regards
> fatma
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029p4666050.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Fatma ELLOUZE
Hello Mr Martin,
Thank you. Just, I want to say that I am using Protege 5.0.0 and here is my pom.xml file. It is the same of the project of swrl-example
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>edu.stanford.swrl</groupId>
    <artifactId>swrlapi-parent</artifactId>
    <version>1.0.10</version>
  </parent>

  <groupId>edu.stanford.swrl</groupId>
  <artifactId>swrlapi-example</artifactId>
  <version>1.0.10</version>
  <packaging>jar</packaging>

  <name>SWRLAPI Example</name>
  <description>Minimal SWRLAPI-based project</description>

  <properties>

    <swrlapi.version>1.0.10</swrlapi.version>
    <swrlapi.drools.version>1.0.10</swrlapi.drools.version>

  </properties>

  <scm>
    <connection>scm:git:git@github.com:protegeproject/swrlapi-example.git</connection>
    <developerConnection>scm:git:git@github.com:protegeproject/swrlapi-example.git</developerConnection>
    <url>https://github.com/protegeproject/swrlapi-example</url>
    <tag>release-1.0.10</tag>
  </scm>

  <dependencies>

    <dependency>
      <groupId>edu.stanford.swrl</groupId>
      <artifactId>swrlapi</artifactId>
      <version>${swrlapi.version}</version>
    </dependency>

    <dependency>
      <groupId>edu.stanford.swrl</groupId>
      <artifactId>swrlapi-drools-engine</artifactId>
      <version>${swrlapi.drools.version}</version>
    </dependency>

    <dependency>
      <groupId>net.sourceforge.owlapi</groupId>
      <artifactId>owlapi-osgidistribution</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>

  </dependencies>

  <build>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive> 
            <manifest>
              <mainClass>org.swrlapi.example.SWRLAPIExample</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <mainClass>org.swrlapi.example.SWRLAPIExample</mainClass>
        </configuration>
      </plugin>

    </plugins>

  </build>

</project>
I am waiting to hearing news from you. Thank you again
Best regards
fatma
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Martin O'Connor-2

There will be a new version of the SWRLTab plugin available by tomorrow that should fix the built-in resolution bug.

Martin

> On Aug 2, 2016, at 3:55 AM, Fatma ELLOUZE <[hidden email]> wrote:
>
> Hello Mr Martin,
> Thank you. Just, I want to say that I am using Protege 5.0.0 and here is my
> pom.xml file. It is the same of the project of swrl-example
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>
>  <parent>
>    <groupId>edu.stanford.swrl</groupId>
>    <artifactId>swrlapi-parent</artifactId>
>    <version>1.0.10</version>
>  </parent>
>
>  <groupId>edu.stanford.swrl</groupId>
>  <artifactId>swrlapi-example</artifactId>
>  <version>1.0.10</version>
>  <packaging>jar</packaging>
>
>  <name>SWRLAPI Example</name>
>  <description>Minimal SWRLAPI-based project</description>
>
>  <properties>
>
>    <swrlapi.version>1.0.10</swrlapi.version>
>    <swrlapi.drools.version>1.0.10</swrlapi.drools.version>
>
>  </properties>
>
>  <scm>
>
> <connection>scm:git:[hidden email]:protegeproject/swrlapi-example.git</connection>
>
> <developerConnection>scm:git:[hidden email]:protegeproject/swrlapi-example.git</developerConnection>
>    <url>https://github.com/protegeproject/swrlapi-example</url>
>    <tag>release-1.0.10</tag>
>  </scm>
>
>  <dependencies>
>
>    <dependency>
>      <groupId>edu.stanford.swrl</groupId>
>      <artifactId>swrlapi</artifactId>
>      <version>${swrlapi.version}</version>
>    </dependency>
>
>    <dependency>
>      <groupId>edu.stanford.swrl</groupId>
>      <artifactId>swrlapi-drools-engine</artifactId>
>      <version>${swrlapi.drools.version}</version>
>    </dependency>
>
>    <dependency>
>      <groupId>net.sourceforge.owlapi</groupId>
>      <artifactId>owlapi-osgidistribution</artifactId>
>    </dependency>
>
>    <dependency>
>      <groupId>org.slf4j</groupId>
>      <artifactId>slf4j-api</artifactId>
>    </dependency>
>
>    <dependency>
>      <groupId>org.slf4j</groupId>
>      <artifactId>slf4j-simple</artifactId>
>    </dependency>
>
>  </dependencies>
>
>  <build>
>
>    <plugins>
>
>      <plugin>
> <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>      </plugin>
>
>      <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-assembly-plugin</artifactId>
> <configuration>
>  <archive>
>    <manifest>
>      <mainClass>org.swrlapi.example.SWRLAPIExample</mainClass>
>    </manifest>
>  </archive>
>  <descriptorRefs>
>    <descriptorRef>jar-with-dependencies</descriptorRef>
>  </descriptorRefs>
> </configuration>
> <executions>
>  <execution>
>    <id>make-assembly</id>
>    <phase>package</phase>
>    <goals>
>              <goal>single</goal>
>    </goals>
>  </execution>
> </executions>
>      </plugin>
>
>      <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <executions>
>  <execution>
>    <goals>
>      <goal>java</goal>
>    </goals>
>  </execution>
> </executions>
> <configuration>
>  <mainClass>org.swrlapi.example.SWRLAPIExample</mainClass>
> </configuration>
>      </plugin>
>
>    </plugins>
>
>  </build>
>
> </project>
> I am waiting to hearing news from you. Thank you again
> Best regards
> fatma
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029p4666060.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Martin O'Connor-2
In reply to this post by Fatma ELLOUZE

Looks like it is in a different location on Windows.

> On Aug 1, 2016, at 4:28 AM, Fatma ELLOUZE <[hidden email]> wrote:
>
> Ok thank you Mr Martin for your reply, but I am sorry if I don't understand
> yet. Indeed, because my Protege 5.0.0 folder does not contain
> "/Contents/Java/plugins". here is a figure that shows what my folders of
> Protege and plugin contain:
> <http://protege-project.136.n4.nabble.com/file/n4666044/Sans_cccitre.png>
>
> Thank you for your help
> Best regards
> fatma
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029p4666044.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Fatma ELLOUZE
So, what can be the solution? please.
In fact, I even try to create a user envirnoment var named CLASSPATH and it does not work also. I know that is not the solution but I try to find a way. My problem has take a much of time that is why I am in a hurry.
Thank you for being here and for your collaboration.
Best regards
Fatma
Reply | Threaded
Open this post in threaded view
|

Re: Jar of the created builtins

Lorenz Buehmann
Martin told you that there is a bug in the plugin with the built-in
resolution...and he will fix it. Please wait!


On 03.08.2016 07:36, Fatma ELLOUZE wrote:

> So, what can be the solution? please.
> In fact, I even try to create a user envirnoment var named CLASSPATH and it
> does not work also. I know that is not the solution but I try to find a way.
> My problem has take a much of time that is why I am in a hurry.
> Thank you for being here and for your collaboration.
> Best regards
> Fatma
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Jar-of-the-created-builtins-tp4666029p4666068.html
> Sent from the Protege User mailing list archive at Nabble.com.
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user