Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mapping 映射子类_Mapping_Subclass_Rdf_Sesame - Fatal编程技术网

Mapping 映射子类

Mapping 映射子类,mapping,subclass,rdf,sesame,Mapping,Subclass,Rdf,Sesame,我正在编写一个应用程序Web(语义Web),用于存储三元组、使用sesame以及数据映射。我的问题是,我必须实现这些类,在三元组的基础上是将一个对象存储为另一个对象的子类,尝试接口,但我没有得到任何结果,下面我给出了“实体”: 父类: import java.math.BigInteger; import org.openrdf.annotations.Iri; @Iri(Parent.NS + "Parent") public interface Parent { public st

我正在编写一个应用程序Web(语义Web),用于存储三元组、使用sesame以及数据映射。我的问题是,我必须实现这些类,在三元组的基础上是将一个对象存储为另一个对象的子类,尝试接口,但我没有得到任何结果,下面我给出了“实体”:

父类:

import java.math.BigInteger;
import org.openrdf.annotations.Iri;

@Iri(Parent.NS + "Parent")
public interface Parent {
    public static final String NS = "http://www.spelta.ec/ontology/example#";

    @Iri(Parent.NS +"code")
    BigInteger getCode();

    @Iri(Parent.NS +"code")
    void setCode(BigInteger code);

    @Iri(Parent.NS+"description")
    String getDescription();

    @Iri(Parent.NS+"description")
    void setDescription(String description);

}
儿童班:

import java.math.BigInteger;

public class Child implements Parent {

    private BigInteger code;

    private String description;

    @Override
    public BigInteger getCode() {
        return code;
    }

    @Override
    public void setCode(BigInteger code) {
       this.code = code;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public void setDescription(String description) {
        this.description = description;
    }

}
要查询三元组的存储,应该定义一个Children类的实例作为Parent的子类

非常感谢