Package com.adobe.xmp.schema.model.rules
Class ClosedChoice
- java.lang.Object
-
- com.adobe.xmp.schema.model.rules.ClosedChoice
-
- All Implemented Interfaces:
TypeRule
,java.io.Serializable
- Direct Known Subclasses:
OpenChoice
public class ClosedChoice extends java.lang.Object implements TypeRule
The rule covers the XMP types "closed choice". An arbitrary number of vocabulary can be added.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.adobe.xmp.schema.model.TypeRule
TypeRule.ComparisonOperator, TypeRule.LogicalOperator
-
-
Constructor Summary
Constructors Constructor Description ClosedChoice(Vocable.Type vocablularyType)
Constructor gets the type information of the Vocabulary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SchemaVisitor schemaVisitor)
void
addVocable(Vocable vocable)
Adds a vocable.void
addVocable(java.lang.Object xmpValue, java.lang.String label)
Add a vocable.java.util.List<Vocable>
getVocabulary()
-
-
-
Constructor Detail
-
ClosedChoice
public ClosedChoice(Vocable.Type vocablularyType)
Constructor gets the type information of the Vocabulary.
-
-
Method Detail
-
addVocable
public void addVocable(java.lang.Object xmpValue, java.lang.String label) throws XMPSchemaException
Add a vocable.- Parameters:
xmpValue
- the XMP value, usually a String, but in some cases it can also be of another type.label
- the display label for the vocable.- Throws:
XMPSchemaException
- Throws an exception if a vocable with the wrong type is added
-
addVocable
public void addVocable(Vocable vocable) throws XMPSchemaException
Adds a vocable.- Parameters:
vocable
- a Vocable- Throws:
XMPSchemaException
- Throws an exception if a vocable with the wrong type is added
-
getVocabulary
public java.util.List<Vocable> getVocabulary()
- Returns:
- Returns all vocabulary.
-
accept
public void accept(SchemaVisitor schemaVisitor) throws XMPSchemaException
- Specified by:
accept
in interfaceTypeRule
- Parameters:
schemaVisitor
- a visitor that implements theSchemaVisitor
-interface- Throws:
XMPSchemaException
- See Also:
TypeRule.accept(com.adobe.xmp.schema.model.SchemaVisitor)
-
-