/** * <p>Add a literal to the enumeration that defines the permissible values of this class.</p> * @param lit A literal to add to the enumeration * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public void addOneOf( Literal lit ) { addListPropertyValue( getProfile().ONE_OF(), "ONE_OF", lit ); }
/** * <p>Add each literal from the given iteration to the * enumeration that defines the permissible values of this datarange.</p> * @param literals An iterator over literals * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public void addOneOf( Iterator<Literal> literals ) { while( literals.hasNext() ) { addOneOf( literals.next() ); } }
/** * <p>Remove the statement that this enumeration includes <code>lit</code> among its members. If this statement * is not true of the current model, nothing happens.</p> * @param lit A literal that may be declared to be part of this data range, and which is * no longer to be one of the data range values. */ @Override public void removeOneOf( Literal lit ) { setOneOf( getOneOf().remove( lit ) ); }
/** * <p>Assert that this data range is exactly the enumeration of the given individuals. Any existing * statements for <code>oneOf</code> will be removed.</p> * @param en A list of literals that defines the permissible values for this datarange * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public void setOneOf( RDFList en ) { setPropertyValue( getProfile().ONE_OF(), "ONE_OF", en ); }
/** * <p>Answer a list of literals that defines the extension of this datarange.</p> * @return A list of literals that is the permissible values * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public RDFList getOneOf() { return objectAs( getProfile().ONE_OF(), "ONE_OF", RDFList.class ); }
/** * <p>Answer true if the given literal is one of the enumerated literals that are the permissible values * of this datarange.</p> * @param lit A literal to test * @return True if the given literal is in the permissible values for this class. * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public boolean hasOneOf( Literal lit ) { return getOneOf().contains( lit ); }
@Override public EnhNode wrap( Node n, EnhGraph eg ) { if (canWrap( n, eg )) { return new DataRangeImpl( n, eg ); } else { throw new ConversionException( "Cannot convert node " + n + " to DataRange"); } }
/** * <p>Assert that this data range is exactly the enumeration of the given individuals. Any existing * statements for <code>oneOf</code> will be removed.</p> * @param en A list of literals that defines the permissible values for this datarange * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public void setOneOf( RDFList en ) { setPropertyValue( getProfile().ONE_OF(), "ONE_OF", en ); }
/** * <p>Answer a list of literals that defines the extension of this datarange.</p> * @return A list of literals that is the permissible values * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public RDFList getOneOf() { return objectAs( getProfile().ONE_OF(), "ONE_OF", RDFList.class ); }
/** * <p>Answer true if the given literal is one of the enumerated literals that are the permissible values * of this datarange.</p> * @param lit A literal to test * @return True if the given literal is in the permissible values for this class. * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public boolean hasOneOf( Literal lit ) { return getOneOf().contains( lit ); }
@Override public EnhNode wrap( Node n, EnhGraph eg ) { if (canWrap( n, eg )) { return new DataRangeImpl( n, eg ); } else { throw new ConversionException( "Cannot convert node " + n + " to DataRange"); } }
/** * <p>Add a literal to the enumeration that defines the permissible values of this class.</p> * @param lit A literal to add to the enumeration * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public void addOneOf( Literal lit ) { addListPropertyValue( getProfile().ONE_OF(), "ONE_OF", lit ); }
/** * <p>Remove the statement that this enumeration includes <code>lit</code> among its members. If this statement * is not true of the current model, nothing happens.</p> * @param lit A literal that may be declared to be part of this data range, and which is * no longer to be one of the data range values. */ @Override public void removeOneOf( Literal lit ) { setOneOf( getOneOf().remove( lit ) ); }
/** * <p>Answer an iterator over all of the literals that are declared to be the permissible values for * this class. Each element of the iterator will be an {@link Literal}.</p> * @return An iterator over the literals that are the permissible values * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public ExtendedIterator<Literal> listOneOf() { return getOneOf().iterator().mapWith( n -> n.as( Literal.class ) ); }
/** * <p>Add each literal from the given iteration to the * enumeration that defines the permissible values of this datarange.</p> * @param literals An iterator over literals * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public void addOneOf( Iterator<Literal> literals ) { while( literals.hasNext() ) { addOneOf( literals.next() ); } }
/** * <p>Answer an iterator over all of the literals that are declared to be the permissible values for * this class. Each element of the iterator will be an {@link Literal}.</p> * @return An iterator over the literals that are the permissible values * @exception ProfileException If the {@link Profile#ONE_OF()} property is not supported in the current language profile. */ @Override public ExtendedIterator<Literal> listOneOf() { return getOneOf().iterator().mapWith( n -> n.as( Literal.class ) ); }