@Override public boolean isValid() { return super.isValid() && isMinCardinalityQRestriction( asNode(), getGraph() ); }
/** * <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 restriction as a has value expression</p> * @return This class, but viewed as a HasValueRestriction node * @exception ConversionException if the class cannot be converted to a has value restriction * given the lanuage profile and the current state of the underlying model. */ @Override public HasValueRestriction asHasValueRestriction() { return as( HasValueRestriction.class ); }
@Override protected Model readDelegate( String url ) { acceptHeaderSet[0] = true; return super.readDelegate( url ); } };
@Override public void runTest() throws Exception { // we don't want inferencing for these unit tests runTest( getOntModel( OntModelSpec.OWL_MEM ), m_inOWL ); m_owlLiteLang = true; runTest( getOntModel( OntModelSpec.OWL_LITE_MEM ), m_inOWLLite ); // now RDFS m_rdfsLang = true; runTest( getOntModel( OntModelSpec.RDFS_MEM ), m_inRDFS); }
/** * <p>Answer a resource representing a symmetric property. If a resource * with the given uri exists in the model, and can be viewed as a SymmetricProperty, return the * SymmetricProperty facet, otherwise return null. </p> * @param uri The uri for the property. May not be null. * @return A SymmetricProperty resource or null */ @Override public SymmetricProperty getSymmetricProperty( String uri ) { return (SymmetricProperty) findByURIAs( uri, SymmetricProperty.class ); }
/** * <p>Answer a view of this class as an intersection class</p> * @return This class, but viewed as an IntersectionClass node * @exception ConversionException if the class cannot be converted to an intersection class * given the lanuage profile and the current state of the underlying model. */ @Override public IntersectionClass asIntersectionClass() { return as( IntersectionClass.class ); }
@Override public boolean doCheck( Node n, EnhGraph g ) { return hasType( n, g, new Resource[] {OWL.ObjectProperty,OWL.TransitiveProperty, OWL.SymmetricProperty, OWL.InverseFunctionalProperty} ); } }
/** * <p>Answer a resource representing an inverse functional property</p> * @param uri The uri for the property. May not be null. * @return An InverseFunctionalProperty resource * @see #createInverseFunctionalProperty( String, boolean ) */ @Override public InverseFunctionalProperty createInverseFunctionalProperty( String uri ) { return createInverseFunctionalProperty( uri, false ); }
/** * <p> * Answer true if this individual is a member of the class denoted by the * given URI.</p> * * @param uri Denotes the URI of a class to which this value may belong * @return True if this individual has the given class as one of its <code>rdf:type</code>'s. */ @Override public boolean hasOntClass( String uri ) { return hasRDFType( uri ); }
/** * <p>Remove the statement that this resource is of the given RDF type. If this statement * is not true of the current model, nothing happens.</p> * @param cls A resource denoting a class that that is to be removed from the classes of this resource */ @Override public void removeRDFType( Resource cls ) { removePropertyValue( RDF.type, "rdf:type", cls ); }
/** * <p>Answer an iterator over all of the properties that are declared to be super-properties of * this property. Each element of the iterator will be an {@link OntProperty}.</p> * @return An iterator over the super-properties of this property. * @exception ProfileException If the {@link Profile#SUB_PROPERTY_OF()} property is not supported in the current language profile. */ @Override public ExtendedIterator<OntProperty> listSuperProperties() { return listSuperProperties( false ); }
@Override public boolean doCheck( Node n, EnhGraph g ) { return hasType( n, g, new Resource[] {RDF.Property, OWL.ObjectProperty, OWL.DatatypeProperty, OWL.AnnotationProperty, OWL.TransitiveProperty, OWL.SymmetricProperty, OWL.InverseFunctionalProperty, OWL.FunctionalProperty} ); } }
/** * <p>Answer true if this class has any super-class in the model. Note that * when using a reasoner, all OWL classes have owl:Thing as a super-class.</p> * @return True if this class has any known super-class. * @exception ProfileException If the {@link Profile#SUB_CLASS_OF()} property is not supported in the current language profile. */ @Override public boolean hasSuperClass() { return getSuperClass() != null; }
@Override protected Model readDelegate( String url, String lang ) { acceptHeaderSet[0] = true; return super.readDelegate( url, lang ); }
/** * <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 restriction as a cardinality restriction class expression</p> * @return This class, but viewed as a CardinalityRestriction node * @exception ConversionException if the class cannot be converted to a cardinality restriction * given the lanuage profile and the current state of the underlying model. */ @Override public CardinalityRestriction asCardinalityRestriction() { return as( CardinalityRestriction.class ); }
/** * <p>Answer a resource representing the class that is the intersection of a list of class descriptions. If a resource * with the given uri exists in the model, and can be viewed as a IntersectionClass, return the * IntersectionClass facet, otherwise return null. </p> * @param uri The URI of the new intersection class. * @return An intersection class description or null */ @Override public IntersectionClass getIntersectionClass( String uri ) { return (IntersectionClass) findByURIAs( uri, IntersectionClass.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 restriction as a max cardinality restriction class expression</p> * @return This class, but viewed as a MaxCardinalityRestriction node * @exception ConversionException if the class cannot be converted to a max cardinality restriction * given the lanuage profile and the current state of the underlying model. */ @Override public MaxCardinalityRestriction asMaxCardinalityRestriction() { return as( MaxCardinalityRestriction.class ); }