|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.ws.resource.metadata.impl.SimpleMetadataDescriptor
public class SimpleMetadataDescriptor
SimpleMetadataDescriptor is Muse's default implementation of the RMD parsing and evaluation stage. It stores a simple lookup table of property names and metadata.
Constructor Summary | |
---|---|
SimpleMetadataDescriptor(Element xml)
Creates a new RMD metadata descriptor from the given XML definition. |
|
SimpleMetadataDescriptor(String name,
String wsdlLocation,
QName wsdlInterface)
This constructor allows users to create RMD docs programmatically, adding wsrmd:Property elements one at a time. |
Method Summary | |
---|---|
void |
addProperty(QName property,
String modifiability,
String mutability)
Adds another wsrmd:Property element to the descriptor with the basic metadata attributes required by the spec. |
boolean |
canDelete(QName propertyQName)
|
boolean |
canInsert(QName propertyQName)
|
boolean |
canUpdate(QName propertyQName)
|
String |
getExtendedMetadata(QName propertyQName,
QName elementName)
This method allows you to extend a wsrmd:Property definition and provide application-specific metadata for a property. |
Collection |
getExtendedMetadataNames(QName propertyQName)
|
Collection |
getInitialValues(QName propertyQName)
|
Collection |
getInitialValues(QName propertyQName,
Class javaType)
|
QName |
getInterface()
|
String |
getLowerBound(QName propertyQName)
|
String |
getModifiability(QName propertyQName)
Most users will probably want to use the canDelete(), canInsert(), and canUpdate() methods to test the permissions of a property; these methods handle the Boolean logic between modifiability and mutability values so you don't have to litter your code with messy if/else blocks. |
String |
getMutability(QName propertyQName)
Most users will probably want to use the canDelete(), canInsert(), and canUpdate() methods to test the permissions of a property; these methods handle the Boolean logic between modifiability and mutability values so you don't have to litter your code with messy if/else blocks. |
String |
getName()
|
Collection |
getPropertyNames()
|
Collection |
getStaticValues(QName propertyQName)
|
Collection |
getStaticValues(QName propertyQName,
Class javaType)
|
String |
getUpperBound(QName propertyQName)
|
Collection |
getValidValues(QName propertyQName)
|
Collection |
getValidValues(QName propertyQName,
Class javaType)
|
String |
getWsdlLocation()
|
boolean |
hasProperty(QName propertyQName)
|
boolean |
isInitialValue(QName propertyQName,
Object value)
|
boolean |
isReadOnlyExternal(QName propertyQName)
|
boolean |
isStaticValue(QName propertyQName,
Object value)
|
boolean |
isValidValue(QName propertyQName,
Object value)
|
void |
removeProperty(QName property)
Removes the wsrmd:Property element with the given name. |
void |
setExtendedMetadata(QName property,
QName elementName,
String value)
This method allows you to extend a wsrmd:Property definition and provide application-specific metadata for a property. |
void |
setInitialValues(QName property,
Collection values)
|
void |
setLowerBound(QName property,
String value)
|
void |
setModifiability(QName property,
String value)
|
void |
setMutability(QName property,
String value)
|
void |
setPropertyName(QName currentProperty,
QName newProperty)
Change the name of one of the current wsrmd:Property elements. |
void |
setStaticValues(QName property,
Collection values)
|
void |
setUpperBound(QName property,
String value)
|
void |
setValidValues(QName property,
Collection values)
|
Element |
toXML()
Converts this object into an XML representation, as defined by its related schema or specification. |
Element |
toXML(Document doc)
Converts this object into an XML representation, as defined by its related schema or specification. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleMetadataDescriptor(String name, String wsdlLocation, QName wsdlInterface)
public SimpleMetadataDescriptor(Element xml)
xml
- The XML representation of the descriptor.Method Detail |
---|
public void addProperty(QName property, String modifiability, String mutability)
MetadataDescriptor
addProperty
in interface MetadataDescriptor
property
- The name of the property this metadata refers to.modifiability
- Use WsrmdConstants.READ_ONLY or WsrmdConstants.READ_WRITE.mutability
- Use WsrmdConstants.CONSTANT, WsrmdConstants.APPENDABLE, or
WsrmdConstants.MUTABLE.WsrmdConstants
public boolean canDelete(QName propertyQName)
canDelete
in interface MetadataDescriptor
public boolean canInsert(QName propertyQName)
canInsert
in interface MetadataDescriptor
public boolean canUpdate(QName propertyQName)
canUpdate
in interface MetadataDescriptor
public String getExtendedMetadata(QName propertyQName, QName elementName)
MetadataDescriptor
getExtendedMetadata
in interface MetadataDescriptor
elementName
- The name of the extended metadata item.
public Collection getExtendedMetadataNames(QName propertyQName)
getExtendedMetadataNames
in interface MetadataDescriptor
public Collection getInitialValues(QName propertyQName)
getInitialValues
in interface MetadataDescriptor
MetadataDescriptor.getInitialValues(QName, Class)
public Collection getInitialValues(QName propertyQName, Class javaType) throws SoapFault
getInitialValues
in interface MetadataDescriptor
javaType
- The type whose serializer should be used to convert the
property values (DOM Elements) into POJOs.
SoapFault
- MetadataDescriptor.getValidValues(QName)
public QName getInterface()
getInterface
in interface MetadataDescriptor
public String getLowerBound(QName propertyQName)
getLowerBound
in interface MetadataDescriptor
public String getModifiability(QName propertyQName)
MetadataDescriptor
getModifiability
in interface MetadataDescriptor
MetadataDescriptor.canDelete(QName)
,
MetadataDescriptor.canInsert(QName)
,
MetadataDescriptor.canUpdate(QName)
public String getMutability(QName propertyQName)
MetadataDescriptor
getMutability
in interface MetadataDescriptor
MetadataDescriptor.canDelete(QName)
,
MetadataDescriptor.canInsert(QName)
,
MetadataDescriptor.canUpdate(QName)
public String getName()
getName
in interface MetadataDescriptor
public Collection getPropertyNames()
getPropertyNames
in interface MetadataDescriptor
public Collection getStaticValues(QName propertyQName)
getStaticValues
in interface MetadataDescriptor
MetadataDescriptor.getStaticValues(QName, Class)
public Collection getStaticValues(QName propertyQName, Class javaType) throws SoapFault
getStaticValues
in interface MetadataDescriptor
javaType
- The type whose serializer should be used to convert the
property values (DOM Elements) into POJOs.
SoapFault
- MetadataDescriptor.getStaticValues(QName)
public String getUpperBound(QName propertyQName)
getUpperBound
in interface MetadataDescriptor
public Collection getValidValues(QName propertyQName)
getValidValues
in interface MetadataDescriptor
MetadataDescriptor.getValidValues(QName, Class)
public Collection getValidValues(QName propertyQName, Class javaType) throws SoapFault
getValidValues
in interface MetadataDescriptor
javaType
- The type whose serializer should be used to convert the
property values (DOM Elements) into POJOs.
SoapFault
- MetadataDescriptor.getValidValues(QName)
public String getWsdlLocation()
getWsdlLocation
in interface MetadataDescriptor
public boolean hasProperty(QName propertyQName)
hasProperty
in interface MetadataDescriptor
public boolean isInitialValue(QName propertyQName, Object value)
isInitialValue
in interface MetadataDescriptor
public boolean isReadOnlyExternal(QName propertyQName)
isReadOnlyExternal
in interface MetadataDescriptor
public boolean isStaticValue(QName propertyQName, Object value)
isStaticValue
in interface MetadataDescriptor
public boolean isValidValue(QName propertyQName, Object value)
isValidValue
in interface MetadataDescriptor
public void removeProperty(QName property)
MetadataDescriptor
removeProperty
in interface MetadataDescriptor
property
- The name of the property to remove.public void setExtendedMetadata(QName property, QName elementName, String value)
MetadataDescriptor
setExtendedMetadata
in interface MetadataDescriptor
property
- The wsrmd:Property element to which the new element should be added.elementName
- The name of the extended metadata item.
param value
The value of the extended metadata item(may be null).public void setInitialValues(QName property, Collection values) throws SoapFault
setInitialValues
in interface MetadataDescriptor
SoapFault
public void setLowerBound(QName property, String value)
setLowerBound
in interface MetadataDescriptor
public void setModifiability(QName property, String value)
setModifiability
in interface MetadataDescriptor
property
- The wsrmd:Property element whose modifiability attribute will be changed.value
- WsrmdConstants.READ_ONLY or WsrmdConstants.READ_WRITEpublic void setMutability(QName property, String value)
setMutability
in interface MetadataDescriptor
property
- The wsrmd:Property element whose mutability attribute will be changed.value
- WsrmdConstants.CONSTANT, WsrmdConstants.APPENDABLE, or WsrmdConstants.MUTABLEpublic void setPropertyName(QName currentProperty, QName newProperty)
MetadataDescriptor
setPropertyName
in interface MetadataDescriptor
public void setStaticValues(QName property, Collection values) throws SoapFault
setStaticValues
in interface MetadataDescriptor
SoapFault
public void setUpperBound(QName property, String value)
setUpperBound
in interface MetadataDescriptor
public void setValidValues(QName property, Collection values) throws SoapFault
setValidValues
in interface MetadataDescriptor
SoapFault
public Element toXML()
XmlSerializable
toXML
in interface XmlSerializable
public Element toXML(Document doc)
XmlSerializable
toXML
in interface XmlSerializable
doc
- The DOM Document that will be used to create all of the nodes
in the resulting XML fragment.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |