/** * <p> * Answer a new, anonymous node representing the fact that a given set of classes are all * pair-wise distinct. <code>AllDifferent</code> is a feature of OWL only, and is something * of an anomaly in that it exists only to give a place to anchor the <code>distinctMembers</code> * property, which is the actual expression of the fact. * </p> * @param differentMembers A list of the class expressions that denote a set of mutually disjoint classes * @return A new AllDifferent resource */ @Override public AllDifferent createAllDifferent( RDFList differentMembers ) { checkProfileEntry( getProfile().ALL_DIFFERENT(), "ALL_DIFFERENT" ); AllDifferent ad = createOntResource( AllDifferent.class, getProfile().ALL_DIFFERENT(), null ); ad.setDistinctMembers( (differentMembers == null) ? createList() : differentMembers ); return ad; }
/** * <p> * Answer a new, anonymous node representing the fact that a given set of classes are all * pair-wise distinct. <code>AllDifferent</code> is a feature of OWL only, and is something * of an anomaly in that it exists only to give a place to anchor the <code>distinctMembers</code> * property, which is the actual expression of the fact. * </p> * @param differentMembers A list of the class expressions that denote a set of mutually disjoint classes * @return A new AllDifferent resource */ @Override public AllDifferent createAllDifferent( RDFList differentMembers ) { checkProfileEntry( getProfile().ALL_DIFFERENT(), "ALL_DIFFERENT" ); AllDifferent ad = createOntResource( AllDifferent.class, getProfile().ALL_DIFFERENT(), null ); ad.setDistinctMembers( (differentMembers == null) ? createList() : differentMembers ); return ad; }
/** * <p>Answer a data range defined as the given set of concrete data values. DataRange resources * are necessarily bNodes.</p> * * @param literals An iterator over a set of literals that will be the members of the data range, * or null to define an empty data range * @return A new data range containing the given literals as permissible values */ @Override public DataRange createDataRange( RDFList literals ) { checkProfileEntry( getProfile().DATARANGE(), "DATARANGE" ); DataRange d = createOntResource( DataRange.class, getProfile().DATARANGE(), null ); checkProfileEntry( getProfile().ONE_OF(), "ONE_OF" ); d.addProperty( getProfile().ONE_OF(), (literals == null) ? createList() : literals ); return d; }
/** * <p>Answer a resource representing the class that is the enumeration of the given list of individuals</p> * @param uri The URI of the new enumeration class, or null for an anonymous class description. * @param members An optional list of resources denoting the individuals in the enumeration * @return An enumeration class */ @Override public EnumeratedClass createEnumeratedClass( String uri, RDFList members ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().ONE_OF(), "ONE_OF" ); c.addProperty( getProfile().ONE_OF(), (members == null) ? createList() : members ); return c.as( EnumeratedClass.class ); }
/** * <p>Answer a data range defined as the given set of concrete data values. DataRange resources * are necessarily bNodes.</p> * * @param literals An iterator over a set of literals that will be the members of the data range, * or null to define an empty data range * @return A new data range containing the given literals as permissible values */ @Override public DataRange createDataRange( RDFList literals ) { checkProfileEntry( getProfile().DATARANGE(), "DATARANGE" ); DataRange d = createOntResource( DataRange.class, getProfile().DATARANGE(), null ); checkProfileEntry( getProfile().ONE_OF(), "ONE_OF" ); d.addProperty( getProfile().ONE_OF(), (literals == null) ? createList() : literals ); return d; }
/** * <p>Answer a resource representing the class that is the enumeration of the given list of individuals</p> * @param uri The URI of the new enumeration class, or null for an anonymous class description. * @param members An optional list of resources denoting the individuals in the enumeration * @return An enumeration class */ @Override public EnumeratedClass createEnumeratedClass( String uri, RDFList members ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().ONE_OF(), "ONE_OF" ); c.addProperty( getProfile().ONE_OF(), (members == null) ? createList() : members ); return c.as( EnumeratedClass.class ); }
/** * <p>Answer a resource representing the class that is the intersection of the given list of class descriptions.</p> * @param uri The URI of the new intersection class, or null for an anonymous class description. * @param members A list of resources denoting the classes that comprise the intersection * @return An intersection class description */ @Override public IntersectionClass createIntersectionClass( String uri, RDFList members ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().INTERSECTION_OF(), "INTERSECTION_OF" ); c.addProperty( getProfile().INTERSECTION_OF(), (members == null) ? createList() : members ); return c.as( IntersectionClass.class ); }
/** * <p>Answer a resource representing the class that is the union of the given list of class desctiptions</p> * @param uri The URI of the new union class, or null for an anonymous class description. * @param members A list of resources denoting the classes that comprise the union * @return A union class description */ @Override public UnionClass createUnionClass( String uri, RDFList members ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().UNION_OF(), "UNION_OF" ); c.addProperty( getProfile().UNION_OF(), (members == null) ? createList() : members ); return c.as( UnionClass.class ); }
/** * <p>Answer a resource representing the class that is the union of the given list of class desctiptions</p> * @param uri The URI of the new union class, or null for an anonymous class description. * @param members A list of resources denoting the classes that comprise the union * @return A union class description */ @Override public UnionClass createUnionClass( String uri, RDFList members ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().UNION_OF(), "UNION_OF" ); c.addProperty( getProfile().UNION_OF(), (members == null) ? createList() : members ); return c.as( UnionClass.class ); }
/** * <p>Answer a resource representing the class that is the intersection of the given list of class descriptions.</p> * @param uri The URI of the new intersection class, or null for an anonymous class description. * @param members A list of resources denoting the classes that comprise the intersection * @return An intersection class description */ @Override public IntersectionClass createIntersectionClass( String uri, RDFList members ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().INTERSECTION_OF(), "INTERSECTION_OF" ); c.addProperty( getProfile().INTERSECTION_OF(), (members == null) ? createList() : members ); return c.as( IntersectionClass.class ); }