public final class Datatypes
extends java.lang.Object
DatatypeDefinition objects and represents the collection off all
DatatypeDefinition objects defined in a ReqIF file.
The class wraps the <DATATYPES> element in a ReqIF file. The element can contain any number of child
DATATYPE-DEFINITION elements.
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(DatatypeDefinition datatypeDefinition)
Checks whether the specified
DatatypeDefinition exists in this collection. |
boolean |
containsIdentifiableWithLongName(java.lang.String longName)
Checks for existence of an
Identifiable in this collection with the specified longName. |
boolean |
containsKey(java.lang.String identifier)
Checks whether this collection contains the
Identifiable whose identfier matches that specified in the argument |
DatatypeDefinitionBoolean |
createDatatypeDefinitionBoolean(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
DatatypeDefinitionBoolean and adds it to this ReqIF. |
DatatypeDefinitionDate |
createDatatypeDefinitionDate(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
DatatypeDefinitionDate and adds it to this ReqIF. |
DatatypeDefinitionEnumeration |
createDatatypeDefinitionEnumeration(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
DatatypeDefinitionEnumeration and adds it to this ReqIF. |
DatatypeDefinitionInteger |
createDatatypeDefinitionInteger(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID,
long max,
long min)
Constructs a new
DatatypeDefinitionInteger and adds it to this ReqIF. |
DatatypeDefinitionReal |
createDatatypeDefinitionReal(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID,
long accuracy,
double max,
double min)
Constructs a new
DatatypeDefinitionReal and adds it to this ReqIF. |
DatatypeDefinitionString |
createDatatypeDefinitionString(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID,
long maxLength)
Constructs a new
DatatypeDefinitionString and adds it to this ReqIF. |
DatatypeDefinitionXHTML |
createDatatypeDefinitionXHTML(java.lang.String desc,
java.util.Date lastChange,
java.lang.String longName,
java.lang.String identifier,
java.lang.String alternativeID)
Constructs a new
DatatypeDefinitionXHTML and adds it to this ReqIF. |
DatatypeDefinition |
find(java.lang.String longName)
Returns the first occurrence of a
DatatypeDefinition object with the specified longName that is contained in this collection. |
DatatypeDefinition |
get(int index)
Returns the
DatatypeDefinition object at the specified index that is contained in this collection. |
DatatypeDefinition |
get(java.lang.String identifier)
Returns the
DatatypeDefinition object with the specified identifier that is contained in this collection. |
int |
getCount()
Returns the count of items in this collection.
|
java.util.Iterator<DatatypeDefinition> |
iterator() |
void |
remove(DatatypeDefinition datatypeDefinition)
Removes a
DatatypeDefinition object from this collection. |
java.util.stream.Stream<DatatypeDefinition> |
stream() |
java.lang.String |
toString() |
public java.util.stream.Stream<DatatypeDefinition> stream()
public java.util.Iterator<DatatypeDefinition> iterator()
iterator in interface java.lang.Iterable<DatatypeDefinition>public DatatypeDefinition get(int index) throws java.lang.IndexOutOfBoundsException
DatatypeDefinition object at the specified index that is contained in this collection.index - the index of the DatatypeDefinition to return from the collection, >= 0 and < collection sizeDatatypeDefinition object at the specified indexjava.lang.IndexOutOfBoundsException - if the index is < 0 or >= countpublic DatatypeDefinition find(java.lang.String longName)
DatatypeDefinition object with the specified longName that is contained in this collection.longName - the longName of the DatatypeDefinition to return, not nullDatatypeDefinition subclass with the specified longName, can be nullpublic DatatypeDefinition get(java.lang.String identifier) throws UnknownIdentifierException
DatatypeDefinition object with the specified identifier that is contained in this collection.identifier - the identifier of the collection member to returnDatatypeDefinition subclass with the specified identifierUnknownIdentifierException - if the object identified by the Identifier parameter can't be foundpublic boolean contains(DatatypeDefinition datatypeDefinition)
DatatypeDefinition exists in this collection.datatypeDefinition - the DatatypeDefinition to check, not nulltrue if the specified datatypeDefinition exists, false otherwisepublic void remove(DatatypeDefinition datatypeDefinition) throws NotFoundException, ReferencedException
DatatypeDefinition object from this collection.datatypeDefinition - the DatatypeDefinition object to remove, not nullNotFoundException - if the specified DatatypeDefinition object is not in the collectionReferencedException - if the specified DatatypeDefinition object is referenced in other AttributeDefinition objectspublic DatatypeDefinitionBoolean createDatatypeDefinitionBoolean(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionBoolean and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullDatatypeDefinitionBoolean, not nullDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic DatatypeDefinitionDate createDatatypeDefinitionDate(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionDate and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullDatatypeDefinitionDate, not nullDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic DatatypeDefinitionEnumeration createDatatypeDefinitionEnumeration(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionEnumeration and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullDatatypeDefinitionEnumeration, not nullDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic DatatypeDefinitionInteger createDatatypeDefinitionInteger(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID, long max, long min) throws InvalidValueException, DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionInteger and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullmax - the long value to be assigned to the MAX attribute, not nullmin - the long value to be assigned to the MIN attribute, not nullDatatypeDefinitionInteger, not nullInvalidValueException - if max is less than minDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic DatatypeDefinitionReal createDatatypeDefinitionReal(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID, long accuracy, double max, double min) throws InvalidValueException, DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionReal and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullaccuracy - the long value to be assigned to the ACCURACY attributemax - the double value to be assigned to the MAX attributemin - the double value to be assigned to the MIN attributeDatatypeDefinitionReal, not nullInvalidValueException - if accuracy is negative or max is less than minDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic DatatypeDefinitionString createDatatypeDefinitionString(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID, long maxLength) throws InvalidValueException, DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionString and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullmaxLength - the long value to be assigned to the MAX-LENGTH attributeDatatypeDefinitionString, not nullInvalidValueException - if maxLength is negativeDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic DatatypeDefinitionXHTML createDatatypeDefinitionXHTML(java.lang.String desc, java.util.Date lastChange, java.lang.String longName, java.lang.String identifier, java.lang.String alternativeID) throws DuplicateIdentifierException, InvalidIdentifierException
DatatypeDefinitionXHTML and adds it to this ReqIF.
Since LONG-NAME is optional it is permitted to create multiple datatype definitions with the same LONG-NAME
even with different data types.
desc - the value to be assigned to the DESC attribute, can be nulllastChange - the date value to be assigned to the LAST-CHANGE attribute, can be null in which case 'now' is assignedlongName - the value to be assigned to the LONG-NAME attribute, can be nullidentifier - the identifier in xsd:ID format to assign to this object, can be null to auto-assignalternativeID - the value to be assigned to the ALTERNATIVE-ID::IDENTIFIER attribute, can be nullDatatypeDefinitionXHTML, not nullDuplicateIdentifierException - if the specified identifier is not uniqueInvalidIdentifierException - if the specified identifier is not valid xsd:ID formatpublic boolean containsKey(java.lang.String identifier)
Identifiable whose identfier matches that specified in the argumentidentifier - the identifier of the member to check for occurrence in the collection, not nullpublic boolean containsIdentifiableWithLongName(java.lang.String longName)
Identifiable in this collection with the specified longName.longName - the value of longName to check, nullable since longName can be nullIdentifiable with the specified longName exists in this collection, otherwise falsepublic java.lang.String toString()
toString in class java.lang.Objectpublic int getCount()