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 aPropertyDescriptionobject 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 voidaddChild(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.ACCESSgetAccess()ArrayType.ArrayFormgetArrayForm()com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.CHOICEgetChoice()DatatypeInfogetDataType()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 thisPropertyInfojava.lang.StringgetDescription()java.util.Stack<PropertyInfo>getFields()java.lang.StringgetLabel()java.lang.StringgetName()java.lang.StringgetNS()ParamInfoGroupgetParamInfos()java.util.Stack<PropertyInfo>getQualifiers()DatatypeInfogetRawDataType()SchemaInfogetSchemaInfo()booleanhasDecorators()Returns if this property has decoratorsbooleanisArrayItemQualifier()Gets if the propertyInfo holds information for an array item qualifier.booleanisDeprecated()booleanisMandatory()booleanisQualifier()voidsetAccess(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS mAccess)voidsetArrayForm(ArrayType.ArrayForm form)voidsetChoice(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.CHOICE choice)voidsetDataType(DatatypeInfo mDataType)voidsetDeprecated(boolean mDeprecated)voidsetDescription(java.lang.String mDescription)voidsetIsArrayItemQualifier(boolean isArrayItemQualifier)Sets if this propertyInfo stores information for an array item qualifier.voidsetIsQualifier(boolean isQualifier)voidsetLabel(java.lang.String mLabel)voidsetMandatory(boolean mMandatory)voidsetName(java.lang.String mName)voidsetNS(java.lang.String mNS)voidsetParamInfos(ParamInfoGroup mParamInfos)voidsetRawDataType(DatatypeInfo mRawDataType)voidsetSchemaInfo(SchemaInfo mSchemaInfo)java.lang.StringtoString()
-
-
-
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-SchemaInfoobject, 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:
setLabelin interfacePropertyAnnotationInfo- Parameters:
mLabel- the mLabel to set
-
getLabel
public java.lang.String getLabel()
- Specified by:
getLabelin interfacePropertyAnnotationInfo- Returns:
- the mLabel
-
setDescription
public void setDescription(java.lang.String mDescription)
- Specified by:
setDescriptionin interfacePropertyAnnotationInfo- Parameters:
mDescription- the mDescription to set
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfacePropertyAnnotationInfo- Returns:
- the mDescription
-
setAccess
public void setAccess(com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS mAccess)
- Specified by:
setAccessin interfacePropertyAnnotationInfo- Parameters:
mAccess- the mAccess to set
-
getAccess
public com.adobe.xmp.schema.rng.parser.annotation.RNGDecorationAnnotation.ACCESS getAccess()
- Specified by:
getAccessin 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:
toStringin classjava.lang.Object
-
-