Package com.adobe.xmp.schema.rng.model
Class PropertyInfo
- java.lang.Object
-
- com.adobe.xmp.schema.rng.model.PropertyInfo
-
- All Implemented Interfaces:
PropertyAnnotationInfo
public class PropertyInfo extends java.lang.Object implements PropertyAnnotationInfo
This class holds relevant data for constructing aPropertyDescription
object collected from parsing the RelaxNG schema.
-
-
Constructor Summary
Constructors Constructor Description PropertyInfo(java.lang.String ns, java.lang.String name, SchemaInfo schemaInfo)
Constructs a new PropertyInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(PropertyInfo child)
Adds a child, which could either be a property qualifier, array item qualifier or a struct fieldcom.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS
getAccess()
ArrayType.ArrayForm
getArrayForm()
com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.CHOICE
getChoice()
DatatypeInfo
getDataType()
java.util.Map<java.lang.String,java.lang.String>
getDecorator(javax.xml.namespace.QName qname)
Gets decorator map for givenQName
.java.util.HashMap<javax.xml.namespace.QName,java.util.Map<java.lang.String,java.lang.String>>
getDecoratorStore()
Gets the decorator store for thisPropertyInfo
java.lang.String
getDescription()
java.util.Stack<PropertyInfo>
getFields()
java.lang.String
getLabel()
java.lang.String
getName()
java.lang.String
getNS()
ParamInfoGroup
getParamInfos()
java.util.Stack<PropertyInfo>
getQualifiers()
DatatypeInfo
getRawDataType()
SchemaInfo
getSchemaInfo()
boolean
hasDecorators()
Returns if this property has decoratorsboolean
isArrayItemQualifier()
Gets if the propertyInfo holds information for an array item qualifier.boolean
isDeprecated()
boolean
isMandatory()
boolean
isQualifier()
void
setAccess(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS mAccess)
void
setArrayForm(ArrayType.ArrayForm form)
void
setChoice(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.CHOICE choice)
void
setDataType(DatatypeInfo mDataType)
void
setDeprecated(boolean mDeprecated)
void
setDescription(java.lang.String mDescription)
void
setIsArrayItemQualifier(boolean isArrayItemQualifier)
Sets if this propertyInfo stores information for an array item qualifier.void
setIsQualifier(boolean isQualifier)
void
setLabel(java.lang.String mLabel)
void
setMandatory(boolean mMandatory)
void
setName(java.lang.String mName)
void
setNS(java.lang.String mNS)
void
setParamInfos(ParamInfoGroup mParamInfos)
void
setRawDataType(DatatypeInfo mRawDataType)
void
setSchemaInfo(SchemaInfo mSchemaInfo)
java.lang.String
toString()
-
-
-
Constructor Detail
-
PropertyInfo
public PropertyInfo(java.lang.String ns, java.lang.String name, SchemaInfo schemaInfo)
Constructs a new PropertyInfo.- Parameters:
ns
- Namespace of the propertyname
- Name of the propertyschemaInfo
-SchemaInfo
object, which stores information retrieved from annotations about the XMP schema
-
-
Method Detail
-
addChild
public void addChild(PropertyInfo child)
Adds a child, which could either be a property qualifier, array item qualifier or a struct field- Parameters:
child
- child to add
-
getQualifiers
public java.util.Stack<PropertyInfo> getQualifiers()
- Returns:
- List of qualifiers of this
PropertyInfo
-
getFields
public java.util.Stack<PropertyInfo> getFields()
- Returns:
- List of fields of this
PropertyInfo
. Relevant only for struct property.
-
setNS
public void setNS(java.lang.String mNS)
- Parameters:
mNS
- the mNS to set
-
getNS
public java.lang.String getNS()
- Returns:
- the mNS
-
setName
public void setName(java.lang.String mName)
- Parameters:
mName
- the mName to set
-
getName
public java.lang.String getName()
- Returns:
- the mName
-
setParamInfos
public void setParamInfos(ParamInfoGroup mParamInfos)
- Parameters:
mParamInfos
- the mParamInfos to set
-
getParamInfos
public ParamInfoGroup getParamInfos()
- Returns:
- the mParamInfos
-
setRawDataType
public void setRawDataType(DatatypeInfo mRawDataType)
- Parameters:
mRawDataType
- the mRawDataType to set
-
getRawDataType
public DatatypeInfo getRawDataType()
- Returns:
- the mRawDataType
-
setDataType
public void setDataType(DatatypeInfo mDataType)
- Parameters:
mDataType
- the mDataType to set
-
getDataType
public DatatypeInfo getDataType()
- Returns:
- the mDataType
-
setArrayForm
public void setArrayForm(ArrayType.ArrayForm form)
- Parameters:
form
- the mArrayForm to set
-
getArrayForm
public ArrayType.ArrayForm getArrayForm()
- Returns:
- the mArrayForm
-
setLabel
public void setLabel(java.lang.String mLabel)
- Specified by:
setLabel
in interfacePropertyAnnotationInfo
- Parameters:
mLabel
- the mLabel to set
-
getLabel
public java.lang.String getLabel()
- Specified by:
getLabel
in interfacePropertyAnnotationInfo
- Returns:
- the mLabel
-
setDescription
public void setDescription(java.lang.String mDescription)
- Specified by:
setDescription
in interfacePropertyAnnotationInfo
- Parameters:
mDescription
- the mDescription to set
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interfacePropertyAnnotationInfo
- Returns:
- the mDescription
-
setAccess
public void setAccess(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS mAccess)
- Specified by:
setAccess
in interfacePropertyAnnotationInfo
- Parameters:
mAccess
- the mAccess to set
-
getAccess
public com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS getAccess()
- Specified by:
getAccess
in interfacePropertyAnnotationInfo
- Returns:
- the mAccess
-
setDeprecated
public void setDeprecated(boolean mDeprecated)
- Parameters:
mDeprecated
- the mDeprecated to set
-
isDeprecated
public boolean isDeprecated()
- Returns:
- the mDeprecated
-
setMandatory
public void setMandatory(boolean mMandatory)
- Parameters:
mMandatory
- the mMandatory to set
-
isMandatory
public boolean isMandatory()
- Returns:
- the mMandatory
-
setIsArrayItemQualifier
public void setIsArrayItemQualifier(boolean isArrayItemQualifier)
Sets if this propertyInfo stores information for an array item qualifier.- Parameters:
isArrayItemQualifier
- boolean
-
isArrayItemQualifier
public boolean isArrayItemQualifier()
Gets if the propertyInfo holds information for an array item qualifier.- Returns:
- boolean
-
setIsQualifier
public void setIsQualifier(boolean isQualifier)
- Parameters:
isQualifier
- the mIsQualifier to set
-
isQualifier
public boolean isQualifier()
- Returns:
- the mIsQualifier
-
setSchemaInfo
public void setSchemaInfo(SchemaInfo mSchemaInfo)
- Parameters:
mSchemaInfo
- the mSchemaInfo to set
-
getSchemaInfo
public SchemaInfo getSchemaInfo()
- Returns:
- the mSchemaInfo
-
setChoice
public void setChoice(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.CHOICE choice)
- Parameters:
choice
- the choice to set
-
getChoice
public com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.CHOICE getChoice()
- Returns:
- the choice
-
hasDecorators
public boolean hasDecorators()
Returns if this property has decorators- Returns:
- boolean
-
getDecoratorStore
public java.util.HashMap<javax.xml.namespace.QName,java.util.Map<java.lang.String,java.lang.String>> getDecoratorStore()
Gets the decorator store for thisPropertyInfo
- Returns:
- HashMap
-
getDecorator
public java.util.Map<java.lang.String,java.lang.String> getDecorator(javax.xml.namespace.QName qname)
Gets decorator map for givenQName
. If entry does not exist for the given qname, an entry is created in the decoratorstore.- Parameters:
qname
- qname- Returns:
- Map
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-