/** * <p>Answer a view of this resource as an ontology description node</p> * @return This resource, but viewed as an Ontology * @exception ConversionException if the resource cannot be converted to an ontology description node */ @Override public Ontology asOntology() { return as( Ontology.class ); }
/** * <p>Answer a view of this resource as a datatype property</p> * @return This resource, but viewed as a DatatypeProperty * @exception ConversionException if the resource cannot be converted to a datatype property */ @Override public DatatypeProperty asDatatypeProperty() { return as( DatatypeProperty.class ); }
/** * <p>Answer a view of this resource as an annotation property</p> * @return This resource, but viewed as an AnnotationProperty * @exception ConversionException if the resource cannot be converted to an annotation property */ @Override public AnnotationProperty asAnnotationProperty() { return as( AnnotationProperty.class ); }
/** * <p>Answer a view of this resource as an 'all different' declaration</p> * @return This resource, but viewed as an AllDifferent node * @exception ConversionException if the resource cannot be converted to an all different declaration */ @Override public AllDifferent asAllDifferent() { return as( AllDifferent.class ); }
/** * <p>Answer a view of this resource as an object property</p> * @return This resource, but viewed as an ObjectProperty * @exception ConversionException if the resource cannot be converted to an object property */ @Override public ObjectProperty asObjectProperty() { return as( ObjectProperty.class ); }
/** * <p>Answer a view of this resource as an annotation property</p> * @return This resource, but viewed as an AnnotationProperty * @exception ConversionException if the resource cannot be converted to an annotation property */ @Override public AnnotationProperty asAnnotationProperty() { return as( AnnotationProperty.class ); }
/** * <p>Answer a view of this resource as a datatype property</p> * @return This resource, but viewed as a DatatypeProperty * @exception ConversionException if the resource cannot be converted to a datatype property */ @Override public DatatypeProperty asDatatypeProperty() { return as( DatatypeProperty.class ); }
/** * <p>Answer a view of this resource as a property</p> * @return This resource, but viewed as an OntProperty * @exception ConversionException if the resource cannot be converted to a property */ @Override public OntProperty asProperty() { return as( OntProperty.class ); }
/** * <p>Answer a view of this resource as an object property</p> * @return This resource, but viewed as an ObjectProperty * @exception ConversionException if the resource cannot be converted to an object property */ @Override public ObjectProperty asObjectProperty() { return as( ObjectProperty.class ); }
/** * <p>Answer a view of this resource as a data range</p> * @return This resource, but viewed as a DataRange * @exception ConversionException if the resource cannot be converted to a data range */ @Override public DataRange asDataRange() { return as( DataRange.class ); }
/** * <p>Answer a view of this resource as an individual</p> * @return This resource, but viewed as an Individual * @exception ConversionException if the resource cannot be converted to an individual */ @Override public Individual asIndividual() { return as( Individual.class ); }
/** * <p>Answer a view of this resource as a class</p> * @return This resource, but viewed as an OntClass * @exception ConversionException if the resource cannot be converted to a class */ @Override public OntClass asClass() { return as( OntClass.class ); }
/** * <p>Answer a view of this resource as a property</p> * @return This resource, but viewed as an OntProperty * @exception ConversionException if the resource cannot be converted to a property */ @Override public OntProperty asProperty() { return as( OntProperty.class ); }
/** * <p>Answer a view of this resource as an ontology description node</p> * @return This resource, but viewed as an Ontology * @exception ConversionException if the resource cannot be converted to an ontology description node */ @Override public Ontology asOntology() { return as( Ontology.class ); }
/** * <p>Answer a view of this resource as an 'all different' declaration</p> * @return This resource, but viewed as an AllDifferent node * @exception ConversionException if the resource cannot be converted to an all different declaration */ @Override public AllDifferent asAllDifferent() { return as( AllDifferent.class ); }
/** * <p>Answer a view of this resource as an individual</p> * @return This resource, but viewed as an Individual * @exception ConversionException if the resource cannot be converted to an individual */ @Override public Individual asIndividual() { return as( Individual.class ); }
/** * <p>Answer a view of this resource as a class</p> * @return This resource, but viewed as an OntClass * @exception ConversionException if the resource cannot be converted to a class */ @Override public OntClass asClass() { return as( OntClass.class ); }
/** * <p>Answer a view of this resource as a data range</p> * @return This resource, but viewed as a DataRange * @exception ConversionException if the resource cannot be converted to a data range */ @Override public DataRange asDataRange() { return as( DataRange.class ); }
/** Convert this resource to the facet denoted by cls, by adding rdf:type type if necessary */ protected <T extends RDFNode> T convertToType( Resource type, String name, Class<T> cls ) { checkProfile( type, name ); if (canAs( cls )) { // don't need to update the model, we already can do the given facet return as( cls ); } // we're told that adding this rdf:type will make the as() possible - let's see addProperty( RDF.type, type ); return as( cls ); }
/** Convert this resource to the facet denoted by cls, by adding rdf:type type if necessary */ protected <T extends RDFNode> T convertToType( Resource type, String name, Class<T> cls ) { checkProfile( type, name ); if (canAs( cls )) { // don't need to update the model, we already can do the given facet return as( cls ); } // we're told that adding this rdf:type will make the as() possible - let's see addProperty( RDF.type, type ); return as( cls ); }