org.apache.muse.ws.resource.metadata
Class OpenMetadataDescriptor

java.lang.Object
  extended byorg.apache.muse.ws.resource.metadata.OpenMetadataDescriptor
All Implemented Interfaces:
MetadataDescriptor, XmlSerializable

public class OpenMetadataDescriptor
extends java.lang.Object
implements MetadataDescriptor

OpenMetadataDescriptor is a MetadataDescriptor that allows free reign on all properties, since no rules or restrictions have been put in place. This class is a singleton because an empty RMD is the same no matter what properties are defined.

Author:
Dan Jemiolo (danj)

Method Summary
 boolean canDelete(QName property)
           
 boolean canInsert(QName property)
           
 boolean canUpdate(QName property)
           
 java.lang.String getExtendedMetadata(QName property, QName elementName)
          This method allows you to extend a wsrmd:Property definition and provide application-specific metadata for a property.
 java.util.Collection getInitialValues(QName property)
           
 java.util.Collection getInitialValues(QName property, java.lang.Class type)
           
static OpenMetadataDescriptor getInstance()
           
 QName getInterface()
           
 java.lang.String getLowerBound(QName property)
           
 java.lang.String getName()
           
 java.util.Collection getPropertyNames()
           
 java.util.Collection getStaticValues(QName property)
           
 java.util.Collection getStaticValues(QName property, java.lang.Class type)
           
 java.lang.String getUpperBound(QName property)
           
 java.util.Collection getValidValues(QName property)
           
 java.util.Collection getValidValues(QName property, java.lang.Class type)
           
 java.lang.String getWsdlLocation()
           
 boolean hasProperty(QName property)
           
 boolean isInitialValue(QName property, java.lang.Object value)
           
 boolean isReadOnlyExternal(QName property)
           
 boolean isStaticValue(QName property, java.lang.Object value)
           
 boolean isValidValue(QName property, java.lang.Object value)
           
 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
 

Method Detail

getInstance

public static OpenMetadataDescriptor getInstance()
Returns:
The singleton instance of this class.

canDelete

public boolean canDelete(QName property)
Specified by:
canDelete in interface MetadataDescriptor
Parameters:
property -
Returns:
true

canInsert

public boolean canInsert(QName property)
Specified by:
canInsert in interface MetadataDescriptor
Parameters:
property -
Returns:
true

canUpdate

public boolean canUpdate(QName property)
Specified by:
canUpdate in interface MetadataDescriptor
Parameters:
property -
Returns:
true

getExtendedMetadata

public java.lang.String getExtendedMetadata(QName property,
                                            QName elementName)
Description copied from interface: MetadataDescriptor
This method allows you to extend a wsrmd:Property definition and provide application-specific metadata for a property. These will be parsed as simple name-value pairs - you cannot associate complex types or XML fragments with an extended metadata item.

Specified by:
getExtendedMetadata in interface MetadataDescriptor
Parameters:
property -
elementName - The name of the extended metadata item.
Returns:
The value of the extended metadata item, or null if there is no such item.

getInitialValues

public java.util.Collection getInitialValues(QName property)
Specified by:
getInitialValues in interface MetadataDescriptor
Parameters:
property -
Returns:
An empty collection.
See Also:
MetadataDescriptor.getInitialValues(QName, Class)

getInitialValues

public java.util.Collection getInitialValues(QName property,
                                             java.lang.Class type)
Specified by:
getInitialValues in interface MetadataDescriptor
Parameters:
property -
type - The type whose serializer should be used to convert the property values (DOM Elements) into POJOs.
Returns:
An empty collection.
See Also:
MetadataDescriptor.getValidValues(QName)

getInterface

public QName getInterface()
Specified by:
getInterface in interface MetadataDescriptor

getLowerBound

public java.lang.String getLowerBound(QName property)
Specified by:
getLowerBound in interface MetadataDescriptor
Parameters:
property -
Returns:
null

getName

public java.lang.String getName()
Specified by:
getName in interface MetadataDescriptor
Returns:
null

getPropertyNames

public java.util.Collection getPropertyNames()
Specified by:
getPropertyNames in interface MetadataDescriptor
Returns:
An empty collection.

getStaticValues

public java.util.Collection getStaticValues(QName property)
Specified by:
getStaticValues in interface MetadataDescriptor
Parameters:
property -
Returns:
An empty collection.
See Also:
MetadataDescriptor.getStaticValues(QName, Class)

getStaticValues

public java.util.Collection getStaticValues(QName property,
                                            java.lang.Class type)
Specified by:
getStaticValues in interface MetadataDescriptor
Parameters:
property -
type - The type whose serializer should be used to convert the property values (DOM Elements) into POJOs.
Returns:
An empty collection.
See Also:
MetadataDescriptor.getStaticValues(QName)

getUpperBound

public java.lang.String getUpperBound(QName property)
Specified by:
getUpperBound in interface MetadataDescriptor
Parameters:
property -
Returns:
null

getValidValues

public java.util.Collection getValidValues(QName property)
Specified by:
getValidValues in interface MetadataDescriptor
Parameters:
property -
Returns:
An empty collection.
See Also:
MetadataDescriptor.getValidValues(QName, Class)

getValidValues

public java.util.Collection getValidValues(QName property,
                                           java.lang.Class type)
Specified by:
getValidValues in interface MetadataDescriptor
Parameters:
property -
type - The type whose serializer should be used to convert the property values (DOM Elements) into POJOs.
Returns:
An empty collection.
See Also:
MetadataDescriptor.getValidValues(QName)

getWsdlLocation

public java.lang.String getWsdlLocation()
Specified by:
getWsdlLocation in interface MetadataDescriptor

hasProperty

public boolean hasProperty(QName property)
Specified by:
hasProperty in interface MetadataDescriptor
Parameters:
property -
Returns:
true

isInitialValue

public boolean isInitialValue(QName property,
                              java.lang.Object value)
Specified by:
isInitialValue in interface MetadataDescriptor
Parameters:
property -
value -
Returns:
false

isReadOnlyExternal

public boolean isReadOnlyExternal(QName property)
Specified by:
isReadOnlyExternal in interface MetadataDescriptor
Parameters:
property -
Returns:
false

isStaticValue

public boolean isStaticValue(QName property,
                             java.lang.Object value)
Specified by:
isStaticValue in interface MetadataDescriptor
Parameters:
property -
value -
Returns:
false

isValidValue

public boolean isValidValue(QName property,
                            java.lang.Object value)
Specified by:
isValidValue in interface MetadataDescriptor
Parameters:
property -
value -
Returns:
true

toXML

public org.w3c.dom.Element toXML()
Description copied from interface: XmlSerializable
Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

Specified by:
toXML in interface XmlSerializable
Returns:
An XML representation of this object.

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
Description copied from interface: XmlSerializable
Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

Specified by:
toXML in interface XmlSerializable
Parameters:
doc - The DOM Document that will be used to create all of the nodes in the resulting XML fragment.
Returns:
An XML representation of this object.