Severity Error on Alibaba (owl-compiler.sh) Compiled code:

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Severity Error on Alibaba (owl-compiler.sh) Compiled code:

Eric Stephan
Why is Sesame reporting a severity error on code Alibaba generated?  I am getting a severity error when using code generated from alibaba.  

Thanks!

The example.ttl file (below) contained two classes.    When running the alibaba owl-compiler.sh:  "owl-compiler.sh example.ttl  -j example.jar" Two java interfaces are generated (MessageContent.java, and MessagePart) as expected along with a subClassOf.java file.   Based on this I created two Java classes dsaMessageContent and dsaMessagePart.  When I attempt to add an object at runtime:

[ERROR MESSAGE]

INFO: Scanning xxx/bin for concepts

Oct 29, 2013 2:50:03 PM org.openrdf.repository.object.ObjectRepository compileSchema

INFO: Compiling schema

Oct 29, 2013 2:50:03 PM org.openrdf.repository.object.composition.ClassResolver composeBehaviours

SEVERE: Cannot compose multiple concept classes: [class msm.dsaMessagePart, interface msm.MessageContent, class msm.dsaMessageContent, class org.openrdf.repository.object.behaviours.RDFObjectImpl]


[TEST]

public static void main(String[] args) {

       ObjectRepository repo = connectRepo();

       if (repo == null) {

       System.exit(1);

       } else {

      ValueFactory vf = repo.getValueFactory();

      org.openrdf.model.URI id = vf.createURI("http://dsa.pnnl.gov/services/example3");

      dsaMessageContent mc = new dsaMessageContent();       

      ObjectConnection conn;

try {

conn = repo.getConnection();

conn.addObject(id,mc);

conn.close();


<---  File: example.ttl: --->



msm:MessageContent    
    a rdfs:Class ;
    rdfs:isDefinedBy msm: ;
    rdfs:label "Message Content"@en ;
    rdfs:subClassOf msm:MessagePart .

msm:MessagePart   
    a rdfs:Class ;
    rdfs:isDefinedBy msm: ;
    rdfs:label "Message Part"@en .


<--- Generated Interface File: msm/MessagePart.java: --->


package msm;

import org.openrdf.annotations.Iri;

public interface MessagePart {
}


<---  Generated Interface File msm/MessageContent.java: ---> 

package msm;

import org.openrdf.annotations.Iri;
import rdfs.subClassOf;

public interface MessageContent extends MessagePart {
}

<---  Generated File rdfs/subClassOf.java ---> 

package rdfs;

import java.lang.String;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.openrdf.annotations.Iri;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE, ElementType.PACKAGE})
public @interface subClassOf {
        String[] value();

}


<--- Java Class  dsaMessageContent.java--- >

package msm;
import org.openrdf.annotations.Iri;
import rdfs.subClassOf;


public class dsaMessageContent {


    }


<--- Java Class  dsaMessagePart.java--- >

package msm;
import org.openrdf.annotations.Iri;



public class dsaMessagePart {


    }



------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Sesame-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sesame-general