/** * <p> * Answer a resource that represents an Indvidual node in this model. A new anonymous resource * will be created in the updateable sub-graph of the ontology model. * </p> * * @param cls Resource representing the ontology class to which the individual belongs * @return A new anoymous Individual of the given class. */ @Override public Individual createIndividual( Resource cls ) { return createOntResource( Individual.class, cls, null ); }
/** * <p> * Answer a resource that represents an Indvidual node in this model. A new anonymous resource * will be created in the updateable sub-graph of the ontology model. * </p> * * @param cls Resource representing the ontology class to which the individual belongs * @return A new anoymous Individual of the given class. */ @Override public Individual createIndividual( Resource cls ) { return createOntResource( Individual.class, cls, null ); }
/** * <p> * Answer a resource that represents an Individual node in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param cls Resource representing the ontology class to which the individual belongs * @param uri The uri for the individual, or null for an anonymous individual. * @return An Individual resource. */ @Override public Individual createIndividual( String uri, Resource cls ) { return createOntResource( Individual.class, cls, uri ); }
/** * <p> * Answer a resource that represents an Individual node in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param cls Resource representing the ontology class to which the individual belongs * @param uri The uri for the individual, or null for an anonymous individual. * @return An Individual resource. */ @Override public Individual createIndividual( String uri, Resource cls ) { return createOntResource( Individual.class, cls, uri ); }
/** * <p> * Answer a resource that represents an anonymous class description in this model. A new * anonymous resource of <code>rdf:type C</code>, where C is the class type from the * language profile. * </p> * * @return An anonymous Class resource. */ @Override public OntClass createClass() { checkProfileEntry( getProfile().CLASS(), "CLASS" ); return createOntResource( OntClass.class, getProfile().CLASS(), null ); }
/** * <p> * Answer a resource that represents an anonymous class description in this model. A new * anonymous resource of <code>rdf:type C</code>, where C is the class type from the * language profile. * </p> * * @return An anonymous Class resource. */ @Override public OntClass createClass() { checkProfileEntry( getProfile().CLASS(), "CLASS" ); return createOntResource( OntClass.class, getProfile().CLASS(), null ); }
/** * <p> * Answer a resource that represents a class description node in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param uri The uri for the class node, or null for an anonymous class. * @return A Class resource. */ @Override public OntClass createClass( String uri ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); return createOntResource( OntClass.class, getProfile().CLASS(), uri ); }
/** * <p> * Answer a resource that represents an annotation property in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param uri The uri for the annotation property. * @return An AnnotationProperty resource. */ @Override public AnnotationProperty createAnnotationProperty( String uri ) { checkProfileEntry( getProfile().ANNOTATION_PROPERTY(), "ANNOTATION_PROPERTY" ); return createOntResource( AnnotationProperty.class, getProfile().ANNOTATION_PROPERTY(), uri ); }
/** * <p> * Answer a resource that represents an ontology description node in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param uri The uri for the ontology node. Conventionally, this corresponds to the base URI * of the document itself. * @return An Ontology resource. */ @Override public Ontology createOntology( String uri ) { checkProfileEntry( getProfile().ONTOLOGY(), "ONTOLOGY" ); return createOntResource( Ontology.class, getProfile().ONTOLOGY(), uri ); }
/** * <p> * Answer a resource that represents an annotation property in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param uri The uri for the annotation property. * @return An AnnotationProperty resource. */ @Override public AnnotationProperty createAnnotationProperty( String uri ) { checkProfileEntry( getProfile().ANNOTATION_PROPERTY(), "ANNOTATION_PROPERTY" ); return createOntResource( AnnotationProperty.class, getProfile().ANNOTATION_PROPERTY(), uri ); }
/** * <p> * Answer a resource that represents an ontology description node in this model. If a resource * with the given uri exists in the model, it will be re-used. If not, a new one is created in * the updateable sub-graph of the ontology model. * </p> * * @param uri The uri for the ontology node. Conventionally, this corresponds to the base URI * of the document itself. * @return An Ontology resource. */ @Override public Ontology createOntology( String uri ) { checkProfileEntry( getProfile().ONTOLOGY(), "ONTOLOGY" ); return createOntResource( Ontology.class, getProfile().ONTOLOGY(), uri ); }
/** * <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 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 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 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 ); }
/** * <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 complement of the given argument class</p> * @param uri The URI of the new complement class, or null for an anonymous class description. * @param cls Resource denoting the class that the new class is a complement of * @return A complement class */ @Override public ComplementClass createComplementClass( String uri, Resource cls ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().COMPLEMENT_OF(), "COMPLEMENT_OF" ); // if the class that this class is a complement of is not specified, use owl:nothing or daml:nothing c.addProperty( getProfile().COMPLEMENT_OF(), (cls == null) ? getProfile().NOTHING() : cls ); return c.as( ComplementClass.class ); }
/** * <p>Answer a resource representing the class that is the complement of the given argument class</p> * @param uri The URI of the new complement class, or null for an anonymous class description. * @param cls Resource denoting the class that the new class is a complement of * @return A complement class */ @Override public ComplementClass createComplementClass( String uri, Resource cls ) { checkProfileEntry( getProfile().CLASS(), "CLASS" ); OntClass c = createOntResource( OntClass.class, getProfile().CLASS(), uri ); checkProfileEntry( getProfile().COMPLEMENT_OF(), "COMPLEMENT_OF" ); // if the class that this class is a complement of is not specified, use owl:nothing or daml:nothing c.addProperty( getProfile().COMPLEMENT_OF(), (cls == null) ? getProfile().NOTHING() : cls ); return c.as( ComplementClass.class ); }