public class FeatureSchema extends Object implements Serializable
AnnotationSchema
class.Constructor and Description |
---|
FeatureSchema(String aFeatureName,
Class<?> aFeatureValueClass,
String aFeatureValue,
String aFeatureUse,
Set<? extends Object> aFeaturePermissibleValuesSet)
Construction given a name of an feature and a feature value class
name
|
Modifier and Type | Method and Description |
---|---|
boolean |
addPermissibleValue(Object obj)
Adds a value to the enumeration of permissible value for a feature
of this type.
|
String |
getFeatureName()
Get the feature name
|
String |
getFeatureValue()
This method returns the value of the feature.
|
Class<?> |
getFeatureValueClass() |
Set<Object> |
getPermittedValues()
Returns the permissible values as a Set
|
String |
getRawFeatureValue()
This method returns the value of the feature regardless of the
current value of featureUse.
|
boolean |
isDefault()
This method is used to check if the feature is default.
|
boolean |
isEnumeration()
Tests whether the values are an enumeration or not.
|
boolean |
isFixed()
This method is used to check if the feature, is fixed.
|
boolean |
isOptional()
This method is used to check if the feature is optional.
|
boolean |
isProhibited()
This method is used to check if the feature is prohibited.
|
boolean |
isRequired()
This method is used to check if the feature is required.
|
void |
setFeatureValue(String aFeatureValue)
This method sets the value of the feature.
|
boolean |
setPermissibleValues(Set<? extends Object> aPermisibleValuesSet)
Adds all values from the given set as permissible values for the
given feature.
|
String |
toXSchema(Map<Class<?>,String> aJava2XSchemaMap)
This method transforms a feature to its XSchema representation.
|
public boolean isEnumeration()
public String getFeatureName()
public Class<?> getFeatureValueClass()
public boolean setPermissibleValues(Set<? extends Object> aPermisibleValuesSet)
public boolean addPermissibleValue(Object obj)
obj
- the object representing a permissible value. If null
then simply returns with false.public String toXSchema(Map<Class<?>,String> aJava2XSchemaMap)
aJava2XSchemaMap
- a Java map object that will be serialized
in XSchemapublic String getFeatureValue()
public String getRawFeatureValue()
public void setFeatureValue(String aFeatureValue)
aFeatureValue
- a String representing the value of a feature.public boolean isRequired()
public boolean isDefault()
public boolean isFixed()
public boolean isOptional()
public boolean isProhibited()
Copyright © 2024 GATE. All rights reserved.