|
|||||||||||
| 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
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(org.w3c.dom.Element xml)
Creates a new RMD metadata descriptor from the given XML definition. |
|
SimpleMetadataDescriptor(java.lang.String name,
java.lang.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,
java.lang.String modifiability,
java.lang.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)
|
java.lang.String |
getExtendedMetadata(QName propertyQName,
QName elementName)
This method allows you to extend a wsrmd:Property definition and provide application-specific metadata for a property. |
java.util.Collection |
getExtendedMetadataNames(QName propertyQName)
|
java.util.Collection |
getInitialValues(QName propertyQName)
|
java.util.Collection |
getInitialValues(QName propertyQName,
java.lang.Class javaType)
|
QName |
getInterface()
|
java.lang.String |
getLowerBound(QName propertyQName)
|
java.lang.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. |
java.lang.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. |
java.lang.String |
getName()
|
java.util.Collection |
getPropertyNames()
|
java.util.Collection |
getStaticValues(QName propertyQName)
|
java.util.Collection |
getStaticValues(QName propertyQName,
java.lang.Class javaType)
|
java.lang.String |
getUpperBound(QName propertyQName)
|
java.util.Collection |
getValidValues(QName propertyQName)
|
java.util.Collection |
getValidValues(QName propertyQName,
java.lang.Class javaType)
|
java.lang.String |
getWsdlLocation()
|
boolean |
hasProperty(QName propertyQName)
|
boolean |
isInitialValue(QName propertyQName,
java.lang.Object value)
|
boolean |
isReadOnlyExternal(QName propertyQName)
|
boolean |
isStaticValue(QName propertyQName,
java.lang.Object value)
|
boolean |
isValidValue(QName propertyQName,
java.lang.Object value)
|
void |
removeProperty(QName property)
Removes the wsrmd:Property element with the given name. |
void |
setExtendedMetadata(QName property,
QName elementName,
java.lang.String value)
This method allows you to extend a wsrmd:Property definition and provide application-specific metadata for a property. |
void |
setInitialValues(QName property,
java.util.Collection values)
|
void |
setLowerBound(QName property,
java.lang.String value)
|
void |
setModifiability(QName property,
java.lang.String value)
|
void |
setMutability(QName property,
java.lang.String value)
|
void |
setPropertyName(QName currentProperty,
QName newProperty)
Change the name of one of the current wsrmd:Property elements. |
void |
setStaticValues(QName property,
java.util.Collection values)
|
void |
setUpperBound(QName property,
java.lang.String value)
|
void |
setValidValues(QName property,
java.util.Collection values)
|
org.w3c.dom.Element |
toXML()
Converts this object into an XML representation, as defined by its related schema or specification. |
org.w3c.dom.Element |
toXML(org.w3c.dom.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(java.lang.String name,
java.lang.String wsdlLocation,
QName wsdlInterface)
public SimpleMetadataDescriptor(org.w3c.dom.Element xml)
xml - The XML representation of the descriptor.| Method Detail |
public void addProperty(QName property,
java.lang.String modifiability,
java.lang.String mutability)
MetadataDescriptor
addProperty in interface MetadataDescriptorproperty - 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.WsrmdConstantspublic boolean canDelete(QName propertyQName)
canDelete in interface MetadataDescriptorpropertyQName -
public boolean canInsert(QName propertyQName)
canInsert in interface MetadataDescriptorpropertyQName -
public boolean canUpdate(QName propertyQName)
canUpdate in interface MetadataDescriptorpropertyQName -
public java.lang.String getExtendedMetadata(QName propertyQName,
QName elementName)
MetadataDescriptor
getExtendedMetadata in interface MetadataDescriptorpropertyQName - elementName - The name of the extended metadata item.
public java.util.Collection getExtendedMetadataNames(QName propertyQName)
getExtendedMetadataNames in interface MetadataDescriptorpropertyQName -
public java.util.Collection getInitialValues(QName propertyQName)
getInitialValues in interface MetadataDescriptorpropertyQName -
MetadataDescriptor.getInitialValues(QName, Class)
public java.util.Collection getInitialValues(QName propertyQName,
java.lang.Class javaType)
throws SoapFault
getInitialValues in interface MetadataDescriptorpropertyQName - 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 MetadataDescriptorpublic java.lang.String getLowerBound(QName propertyQName)
getLowerBound in interface MetadataDescriptorpropertyQName -
public java.lang.String getModifiability(QName propertyQName)
MetadataDescriptor
getModifiability in interface MetadataDescriptorMetadataDescriptor.canDelete(QName),
MetadataDescriptor.canInsert(QName),
MetadataDescriptor.canUpdate(QName)public java.lang.String getMutability(QName propertyQName)
MetadataDescriptor
getMutability in interface MetadataDescriptorMetadataDescriptor.canDelete(QName),
MetadataDescriptor.canInsert(QName),
MetadataDescriptor.canUpdate(QName)public java.lang.String getName()
getName in interface MetadataDescriptorpublic java.util.Collection getPropertyNames()
getPropertyNames in interface MetadataDescriptorpublic java.util.Collection getStaticValues(QName propertyQName)
getStaticValues in interface MetadataDescriptorpropertyQName -
MetadataDescriptor.getStaticValues(QName, Class)
public java.util.Collection getStaticValues(QName propertyQName,
java.lang.Class javaType)
throws SoapFault
getStaticValues in interface MetadataDescriptorpropertyQName - javaType - The type whose serializer should be used to convert the
property values (DOM Elements) into POJOs.
SoapFault - MetadataDescriptor.getStaticValues(QName)public java.lang.String getUpperBound(QName propertyQName)
getUpperBound in interface MetadataDescriptorpropertyQName -
public java.util.Collection getValidValues(QName propertyQName)
getValidValues in interface MetadataDescriptorpropertyQName -
MetadataDescriptor.getValidValues(QName, Class)
public java.util.Collection getValidValues(QName propertyQName,
java.lang.Class javaType)
throws SoapFault
getValidValues in interface MetadataDescriptorpropertyQName - javaType - The type whose serializer should be used to convert the
property values (DOM Elements) into POJOs.
SoapFault - MetadataDescriptor.getValidValues(QName)public java.lang.String getWsdlLocation()
getWsdlLocation in interface MetadataDescriptorpublic boolean hasProperty(QName propertyQName)
hasProperty in interface MetadataDescriptorpropertyQName -
public boolean isInitialValue(QName propertyQName,
java.lang.Object value)
isInitialValue in interface MetadataDescriptorpropertyQName - value -
public boolean isReadOnlyExternal(QName propertyQName)
isReadOnlyExternal in interface MetadataDescriptorpropertyQName -
public boolean isStaticValue(QName propertyQName,
java.lang.Object value)
isStaticValue in interface MetadataDescriptorpropertyQName - value -
public boolean isValidValue(QName propertyQName,
java.lang.Object value)
isValidValue in interface MetadataDescriptorpropertyQName - value -
public void removeProperty(QName property)
MetadataDescriptor
removeProperty in interface MetadataDescriptorproperty - The name of the property to remove.
public void setExtendedMetadata(QName property,
QName elementName,
java.lang.String value)
MetadataDescriptor
setExtendedMetadata in interface MetadataDescriptorproperty - 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,
java.util.Collection values)
throws SoapFault
setInitialValues in interface MetadataDescriptorSoapFault
public void setLowerBound(QName property,
java.lang.String value)
setLowerBound in interface MetadataDescriptor
public void setModifiability(QName property,
java.lang.String value)
setModifiability in interface MetadataDescriptorproperty - The wsrmd:Property element whose modifiability attribute will be changed.value - WsrmdConstants.READ_ONLY or WsrmdConstants.READ_WRITE
public void setMutability(QName property,
java.lang.String value)
setMutability in interface MetadataDescriptorproperty - The wsrmd:Property element whose mutability attribute will be changed.value - WsrmdConstants.CONSTANT, WsrmdConstants.APPENDABLE, or WsrmdConstants.MUTABLE
public void setPropertyName(QName currentProperty,
QName newProperty)
MetadataDescriptor
setPropertyName in interface MetadataDescriptorcurrentProperty - newProperty -
public void setStaticValues(QName property,
java.util.Collection values)
throws SoapFault
setStaticValues in interface MetadataDescriptorSoapFault
public void setUpperBound(QName property,
java.lang.String value)
setUpperBound in interface MetadataDescriptor
public void setValidValues(QName property,
java.util.Collection values)
throws SoapFault
setValidValues in interface MetadataDescriptorSoapFaultpublic org.w3c.dom.Element toXML()
XmlSerializable
toXML in interface XmlSerializablepublic org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
XmlSerializable
toXML in interface XmlSerializabledoc - 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 | ||||||||||