org.openspml.v2.msg.spml
Class Extensible

java.lang.Object
  extended byorg.openspml.v2.util.xml.BasicMarshallableElement
      extended byorg.openspml.v2.msg.spml.Extensible
All Implemented Interfaces:
MarshallableElement, OpenContentContainer
Direct Known Subclasses:
CapabilitiesList, Capability, CapabilityData, org.openspml.v2.profiles.spmldsml.ExtensibleElement, org.openspml.v2.msg.spml.ExtensibleMarshallable, org.openspml.v2.msg.spmlref.ExtensibleMarshallable, Identifier, Modification, NamespacePrefixMapping, PSO, ResultsIterator, ResultsIterator, Schema, SchemaEntityRef, SearchQuery, Target

public class Extensible
extends BasicMarshallableElement
implements OpenContentContainer

This is the basis of all the various types in the toolkit.

Author:
kent.spaulding@sun.com

Date: Feb 1, 2006


Constructor Summary
Extensible()
          This is public because we need to add these for open content quite often.
 
Method Summary
 void addOpenContentAttr(OpenContentAttr attribute)
           
 void addOpenContentAttr(java.lang.String name, java.lang.String value)
          Add an open content attr to this object.
 void addOpenContentElement(OpenContentElement obj)
          Add an open content element to this object.
 boolean equals(java.lang.Object o)
           
 java.lang.String findOpenContentAttrValueByName(java.lang.String name)
          Convenience method to get the value of the named OpenContentAttr.
 OperationalNameValuePair findOperationalAttrByName(java.lang.String name)
          Deprecated. changing the name of this method.
 OperationalNameValuePair findOperationalNVPByName(java.lang.String name)
          This is a convenience method that looks for our utilitarian operational NVP object.
 PrefixAndNamespaceTuple[] getNamespacesInfo()
          We need to know the namespace of the class to include.
 OpenContentAttr[] getOpenContentAttrs()
          Return an array of all the attributes (name,value) that are not part of the type as defined in the xsd.
 OpenContentElement[] getOpenContentElements()
          Returns an array of all the open content elements.
 java.util.List getOpenContentElements(java.lang.Class cls)
          Return the open content elements that are assignable form the given class.
 int hashCode()
           
 boolean isValid()
          Is this ready to go or are there syntax errors, like missing required fields?
 int removeAllOperationalNVPsWithName(java.lang.String name)
          This will look any OperationalNVP elements and remove those that have a matching name.
 boolean removeOpenContentAttr(OpenContentAttr attribute)
           
 boolean removeOpenContentElement(OpenContentElement obj)
           
 void setOpenContent(OpenContentAttr[] attrs, OpenContentElement[] elements)
          This will clear the existing open content and set it to the values in the given arrays of attributes and elements.
 void setOpenContentAttrs(OpenContentAttr[] attrs)
          This will clear the existing open content attributes and set it to the values in the given array of attributes.
 void setOpenContentElements(OpenContentElement[] elements)
          This will clear the existing open content elements and set it to the values in the given array of elements.
 
Methods inherited from class org.openspml.v2.util.xml.BasicMarshallableElement
getElementName, getElementName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extensible

public Extensible()
This is public because we need to add these for open content quite often.

Method Detail

findOperationalAttrByName

public OperationalNameValuePair findOperationalAttrByName(java.lang.String name)
Deprecated. changing the name of this method.

This is a convenience method that looks for our utilitarian operational attribute object.

Parameters:
name -
Returns:
null if not known, OperationalNVP otherwise.

findOperationalNVPByName

public OperationalNameValuePair findOperationalNVPByName(java.lang.String name)
This is a convenience method that looks for our utilitarian operational NVP object.

Makes it clear that these are Elements we are looking for...

Parameters:
name -
Returns:
The "element" that is the operationalNVP with the given name or null.

removeAllOperationalNVPsWithName

public int removeAllOperationalNVPsWithName(java.lang.String name)
This will look any OperationalNVP elements and remove those that have a matching name. It will return a count of how many were removed.

Parameters:
name - The name of the elements to remove.
Returns:
The count of elements that matched and were removed.

addOpenContentAttr

public void addOpenContentAttr(java.lang.String name,
                               java.lang.String value)
Add an open content attr to this object.

Specified by:
addOpenContentAttr in interface OpenContentContainer
Parameters:
name -
value -

getOpenContentAttrs

public OpenContentAttr[] getOpenContentAttrs()
Return an array of all the attributes (name,value) that are not part of the type as defined in the xsd.

Specified by:
getOpenContentAttrs in interface OpenContentContainer
Returns:
an array of attrs, might be 0 length. Will not be null.

findOpenContentAttrValueByName

public java.lang.String findOpenContentAttrValueByName(java.lang.String name)
Convenience method to get the value of the named OpenContentAttr.

Parameters:
name -
Returns:
The value of the named attr, or null if there isn't one.

addOpenContentElement

public void addOpenContentElement(OpenContentElement obj)
Add an open content element to this object.

Specified by:
addOpenContentElement in interface OpenContentContainer
Parameters:
obj -

getOpenContentElements

public OpenContentElement[] getOpenContentElements()
Returns an array of all the open content elements.

Specified by:
getOpenContentElements in interface OpenContentContainer
Returns:
Never null, but can be zero-length.

getOpenContentElements

public java.util.List getOpenContentElements(java.lang.Class cls)
Return the open content elements that are assignable form the given class.

Parameters:
cls - If the element is assignable for this, return it.
Returns:
a List of all OpenContentElements assignable from the given class (of its type)

getNamespacesInfo

public PrefixAndNamespaceTuple[] getNamespacesInfo()
Description copied from interface: MarshallableElement
We need to know the namespace of the class to include.

Specified by:
getNamespacesInfo in interface MarshallableElement
Specified by:
getNamespacesInfo in class BasicMarshallableElement

isValid

public boolean isValid()
Description copied from interface: MarshallableElement
Is this ready to go or are there syntax errors, like missing required fields?

Specified by:
isValid in interface MarshallableElement
Specified by:
isValid in class BasicMarshallableElement

addOpenContentAttr

public void addOpenContentAttr(OpenContentAttr attribute)

removeOpenContentAttr

public boolean removeOpenContentAttr(OpenContentAttr attribute)

setOpenContentElements

public void setOpenContentElements(OpenContentElement[] elements)
This will clear the existing open content elements and set it to the values in the given array of elements.

Parameters:
elements -

setOpenContentAttrs

public void setOpenContentAttrs(OpenContentAttr[] attrs)
This will clear the existing open content attributes and set it to the values in the given array of attributes.

Parameters:
attrs -

setOpenContent

public void setOpenContent(OpenContentAttr[] attrs,
                           OpenContentElement[] elements)
This will clear the existing open content and set it to the values in the given arrays of attributes and elements.

Parameters:
attrs -
elements -

removeOpenContentElement

public boolean removeOpenContentElement(OpenContentElement obj)

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()


Copyright © Sun Microsystems, Inc. All Rights Reserved.