/** * <p>Remove the statement that this restriction has all values from the given class among * the values for the restricted property. If this statement * is not true of the current model, nothing happens.</p> * @param cls A Resource the denotes the class to be removed from this restriction */ @Override public void removeAllValuesFrom( Resource cls ) { removePropertyValue( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM", cls ); }
/** * <p>Answer true if this property restriction has the given class as the class to which all * values of the restricted property must belong.</p> * @param cls A class to test * @return True if the given class is the class to which all values must belong * @exception ProfileException If the {@link Profile#ALL_VALUES_FROM()} property is not supported in the current language profile. */ @Override public boolean hasAllValuesFrom( Resource cls ) { return hasPropertyValue( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM", cls ); }
/** * <p>Assert that this restriction restricts the property to have all values * be members of the given class. Any existing statements for <code>allValuesFrom</code> * will be removed.</p> * @param cls The class that all values of the property must belong to * @exception ProfileException If the {@link Profile#ALL_VALUES_FROM()} property is not supported in the current language profile. */ @Override public void setAllValuesFrom( Resource cls ) { setPropertyValue( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM", cls ); }
checkProfile( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM" ); Resource r = (Resource) getRequiredProperty( getProfile().ALL_VALUES_FROM() ).getObject(); boolean currentStrict = ((OntModel) getModel()).strictMode(); ((OntModel) getModel()).setStrictMode( true ); ((OntModel) getModel()).setStrictMode( currentStrict );
@Override public EnhNode wrap( Node n, EnhGraph eg ) { if (canWrap( n, eg )) { return new AllValuesFromRestrictionImpl( n, eg ); } else { throw new ConversionException( "Cannot convert node " + n + " to AllValuesFromRestriction"); } }
checkProfile( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM" ); Resource r = (Resource) getRequiredProperty( getProfile().ALL_VALUES_FROM() ).getObject(); boolean currentStrict = ((OntModel) getModel()).strictMode(); ((OntModel) getModel()).setStrictMode( true ); ((OntModel) getModel()).setStrictMode( currentStrict );
@Override public EnhNode wrap( Node n, EnhGraph eg ) { if (canWrap( n, eg )) { return new AllValuesFromRestrictionImpl( n, eg ); } else { throw new ConversionException( "Cannot convert node " + n + " to AllValuesFromRestriction"); } }
/** * <p>Remove the statement that this restriction has all values from the given class among * the values for the restricted property. If this statement * is not true of the current model, nothing happens.</p> * @param cls A Resource the denotes the class to be removed from this restriction */ @Override public void removeAllValuesFrom( Resource cls ) { removePropertyValue( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM", cls ); }
/** * <p>Answer true if this property restriction has the given class as the class to which all * values of the restricted property must belong.</p> * @param cls A class to test * @return True if the given class is the class to which all values must belong * @exception ProfileException If the {@link Profile#ALL_VALUES_FROM()} property is not supported in the current language profile. */ @Override public boolean hasAllValuesFrom( Resource cls ) { return hasPropertyValue( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM", cls ); }
/** * <p>Assert that this restriction restricts the property to have all values * be members of the given class. Any existing statements for <code>allValuesFrom</code> * will be removed.</p> * @param cls The class that all values of the property must belong to * @exception ProfileException If the {@link Profile#ALL_VALUES_FROM()} property is not supported in the current language profile. */ @Override public void setAllValuesFrom( Resource cls ) { setPropertyValue( getProfile().ALL_VALUES_FROM(), "ALL_VALUES_FROM", cls ); }