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