@Override public boolean isValid() { return isCardinalityQRestriction( asNode(), getGraph() ); }
/** * <p>Answer the cardinality of the restricted property.</p> * @return The cardinality of the restricted property * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public int getCardinalityQ() { return objectAsInt( getProfile().CARDINALITY_Q(), "CARDINALITY_Q" ); }
/** * <p>Answer true if this property restriction has the given cardinality.</p> * @param cardinality The cardinality to test against * @return True if the given cardinality is the cardinality of the restricted property in this restriction * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public boolean hasCardinalityQ( int cardinality ) { return hasPropertyValue( getProfile().CARDINALITY_Q(), "CARDINALITY_Q", getModel().createTypedLiteral( cardinality ) ); }
/** * <p>Assert that this restriction restricts the property to have the given * cardinality. Any existing statements for <code>cardinalityQ</code> * will be removed.</p> * @param cardinality The cardinality of the restricted property * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public void setCardinalityQ( int cardinality ) { setPropertyValue( getProfile().CARDINALITY_Q(), "CARDINALITY_Q", getModel().createTypedLiteral( cardinality ) ); }
/** * <p>Remove the statement that this restriction has the given cardinality * for the restricted property. If this statement * is not true of the current model, nothing happens.</p> * @param cardinality A cardinality value to be removed from this restriction * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public void removeCardinalityQ( int cardinality ) { removePropertyValue( getProfile().CARDINALITY_Q(), "CARDINALITY_Q", getModel().createTypedLiteral( cardinality ) ); }
@Override public EnhNode wrap( Node n, EnhGraph eg ) { if (canWrap( n, eg )) { return new CardinalityQRestrictionImpl( n, eg ); } else { throw new ConversionException( "Cannot convert node " + n + " to CardinalityQRestriction"); } }
@Override public boolean canWrap( Node node, EnhGraph eg ) { return isCardinalityQRestriction( node, eg ); } };
/** * <p>Answer true if this property restriction has the given cardinality.</p> * @param cardinality The cardinality to test against * @return True if the given cardinality is the cardinality of the restricted property in this restriction * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public boolean hasCardinalityQ( int cardinality ) { return hasPropertyValue( getProfile().CARDINALITY_Q(), "CARDINALITY_Q", getModel().createTypedLiteral( cardinality ) ); }
/** * <p>Assert that this restriction restricts the property to have the given * cardinality. Any existing statements for <code>cardinalityQ</code> * will be removed.</p> * @param cardinality The cardinality of the restricted property * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public void setCardinalityQ( int cardinality ) { setPropertyValue( getProfile().CARDINALITY_Q(), "CARDINALITY_Q", getModel().createTypedLiteral( cardinality ) ); }
/** * <p>Remove the statement that this restriction has the given cardinality * for the restricted property. If this statement * is not true of the current model, nothing happens.</p> * @param cardinality A cardinality value to be removed from this restriction * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public void removeCardinalityQ( int cardinality ) { removePropertyValue( getProfile().CARDINALITY_Q(), "CARDINALITY_Q", getModel().createTypedLiteral( cardinality ) ); }
@Override public EnhNode wrap( Node n, EnhGraph eg ) { if (canWrap( n, eg )) { return new CardinalityQRestrictionImpl( n, eg ); } else { throw new ConversionException( "Cannot convert node " + n + " to CardinalityQRestriction"); } }
@Override public boolean canWrap( Node node, EnhGraph eg ) { return isCardinalityQRestriction( node, eg ); } };
@Override public boolean isValid() { return isCardinalityQRestriction( asNode(), getGraph() ); }
/** * <p>Answer the cardinality of the restricted property.</p> * @return The cardinality of the restricted property * @exception ProfileException If the {@link Profile#CARDINALITY_Q()} property is not supported in the current language profile. */ @Override public int getCardinalityQ() { return objectAsInt( getProfile().CARDINALITY_Q(), "CARDINALITY_Q" ); }