| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.simonstl.moe.CoreComponent
The CoreComponent class implements the bare minimum of functionality needed for objects to work with MOE.
Note that while this class implements the  AnnotableI interface, it delegates all of the work to an Annotations object.
Similarly, all of the processing of the  NamingI interface is delegated to a Name object.
version 0.01 is the initial release and contains plenty of bogus placeholder functionality.
| Field Summary | |
protected  AnnotableI | 
annotations
contains the annotations - often type information - for this component.  | 
protected  boolean | 
complete
indicates whether the component contains all of its child parts.  | 
protected  int | 
componentType
an int identifying the base type of this component.  | 
protected  ComponentList | 
content
contains the ordered content (typically elements) for the component.  | 
protected  CoreComponent | 
context
used by listen().  | 
protected  Name | 
name
contains the name information for component (if any)  | 
protected  CoreComponentI | 
parent
identifies the parent of this component.  | 
protected  ComponentSet | 
unorderedContent
contains the unordered content (typically attributes) for the component.  | 
| Fields inherited from interface com.simonstl.moe.CoreComponentI | 
ATTRIBUTE, CDATA, CHARS, COMMENT, CONTAINER, DOCTYPE, DOCUMENT, ELEMENT, END_ATTRIBUTE, END_CDATA, END_COMMENT, END_CONTAINER, END_DOCTYPE, END_DOCUMENT, END_ELEMENT, END_NAMESPACE, END_PI, END_PROPERTY, GEN_ENTITY_END, GEN_ENTITY_REF, GEN_ENTITY_START, IG_WHITESPACE, NAMESPACE_DECL, PI, PROPERTY, UNPARSED, VALUE, XML_DECL | 
| Constructor Summary | |
CoreComponent()
 | 
|
| Method Summary | |
protected  CoreComponentI | 
add(CoreComponentI component,
    CoreComponentI context)
 | 
 void | 
addAll(java.util.Map otherAnnotations)
 | 
 void | 
addContent(CoreComponentI newComponent)
Adds content to this component.  | 
 void | 
addUnorderedContent(CoreComponentI newComponent)
Adds an unordered component (usually an attribute) to a component.  | 
 void | 
annotate(java.lang.Object annotationType,
         java.lang.Object annotation)
The annotate() method allows developers to add different kinds of annotation information to components.  | 
 void | 
clearAll()
Clears the name, namespace information, and content for this component.  | 
 void | 
clearContent()
Clears the content for this component.  | 
 void | 
clearName()
Clears the name and namespace information for this component.  | 
 void | 
clearUnorderedContent()
Clears the unordered content (usually attributes) for this component.  | 
 java.lang.Object | 
clone()
Non-clone implementation needs replacement.  | 
 java.util.Map | 
getAllAnnotations()
This method allows developers to retrieve all annotations at once.  | 
 java.lang.Object | 
getAnnotations(java.lang.Object ofAnnotationType)
This method allows developers to retrieve annotations of one particular type.  | 
abstract  int | 
getBasicType()
CoreComponent has no basic type - subclasses MUST provide one.  | 
 ComponentListI | 
getContent()
Returns the content for this component as a list of nodes.  | 
 boolean | 
getIsComplete()
Returns whether this object is complete (i.e., an element has ended).  | 
 java.lang.String | 
getLocalName()
Returns the local name for the component  | 
 NamingI | 
getName()
Returns the name object for the component.  | 
 java.lang.String | 
getNsURI()
Returns the URI reference value for the namespace.  | 
 CoreComponentI | 
getParent()
Returns the parent for the component.  | 
 java.lang.String | 
getPrefix()
Returns the prefix used to represent the namespace URI reference for this component.  | 
 java.lang.String | 
getQName()
Returns the Qualified Name (QName) for the component.  | 
 java.lang.String | 
getTextContent()
Returns the content for this component as a string.  | 
 java.util.Set | 
getTypes()
Returns a Set containing the types of all annotations stored in this object  | 
 ComponentSetI | 
getUnorderedContent()
Returns the unordered content for this component.  | 
 boolean | 
hasAnnotation(java.lang.Object annotation)
Indicates whether the provided object is stored as an annotation (of any type)  | 
 boolean | 
hasAnnotationOfType(java.lang.Object ofAnnotationType)
Indicates whether there are any annotations of the given type.  | 
 boolean | 
hasAnnotations()
 | 
 int | 
hashCode()
The hashCode() method uses nsURI+">"+localName to generate an int.  | 
 boolean | 
listen(CoreComponentI component)
Accepts new events.  | 
 void | 
print()
Prints a representation of the component to STDOUT  | 
 void | 
removeAllAnnotations()
This method allows developers to remove all annotations at once.  | 
 void | 
removeAnnotation(java.lang.Object ofAnnotationType)
This method allows developers to remove a single annotation.  | 
 void | 
setContent(ComponentListI _content)
Sets the content for this component as a list of nodes.  | 
 void | 
setContent(java.lang.String _content)
Sets the content for this component as a string.  | 
 void | 
setIsComplete(boolean _complete)
Sets whether this object is complete (i.e., an element has ended).  | 
 void | 
setLocalName(java.lang.String _localName)
Accepts a string which will serve as the local name for this component.  | 
 void | 
setName(NamingI _name)
Sets the name object for the component.  | 
 void | 
setNsURI(java.lang.String _nsURI)
Accepts a URI reference value which is used as the namespace for the component.  | 
 void | 
setParent(CoreComponentI _parent)
Sets the parent object for the component.  | 
 void | 
setPrefix(java.lang.String _prefix)
Accepts a string which serves as the prefix for this component.  | 
 void | 
setQName(java.lang.String QName)
Sets the Qualified Name (QName) for the component.  | 
 void | 
setUnorderedContent(ComponentSetI newContent)
Sets the unordered content for this component.  | 
protected  CoreComponentI | 
textComponent()
 | 
abstract  java.lang.String | 
toString()
Returns a representation of the component as a String.  | 
| Methods inherited from class java.lang.Object | 
equals, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface com.simonstl.moe.CoreComponentI | 
toString | 
| Field Detail | 
protected Name name
protected ComponentList content
protected ComponentSet unorderedContent
protected boolean complete
protected int componentType
protected AnnotableI annotations
protected CoreComponentI parent
protected CoreComponent context
| Constructor Detail | 
public CoreComponent()
| Method Detail | 
public int hashCode()
hashCode in interface CoreComponentIhashCode in class java.lang.Objectpublic void setNsURI(java.lang.String _nsURI)
CoreComponentIsetNsURI in interface CoreComponentIpublic java.lang.String getNsURI()
CoreComponentIgetNsURI in interface CoreComponentIpublic void setLocalName(java.lang.String _localName)
CoreComponentIsetLocalName in interface CoreComponentIpublic java.lang.String getLocalName()
CoreComponentIgetLocalName in interface CoreComponentIpublic void setPrefix(java.lang.String _prefix)
CoreComponentIsetPrefix in interface CoreComponentIpublic java.lang.String getPrefix()
CoreComponentIgetPrefix in interface CoreComponentIpublic java.lang.String getQName()
getQName in interface CoreComponentIpublic void setQName(java.lang.String QName)
setQName in interface CoreComponentIpublic NamingI getName()
getName in interface CoreComponentIpublic void setName(NamingI _name)
setName in interface CoreComponentIpublic CoreComponentI getParent()
CoreComponentIgetParent in interface CoreComponentIpublic void setParent(CoreComponentI _parent)
CoreComponentIsetParent in interface CoreComponentIpublic void setContent(java.lang.String _content)
CoreComponentIsetContent in interface CoreComponentIpublic void setContent(ComponentListI _content)
CoreComponentIsetContent in interface CoreComponentIpublic void addContent(CoreComponentI newComponent)
CoreComponentIaddContent in interface CoreComponentIpublic void clearContent()
CoreComponentIclearContent in interface CoreComponentIpublic java.lang.String getTextContent()
CoreComponentIgetTextContent in interface CoreComponentIpublic ComponentListI getContent()
CoreComponentIgetContent in interface CoreComponentIpublic void addUnorderedContent(CoreComponentI newComponent)
CoreComponentIaddUnorderedContent in interface CoreComponentIpublic void clearUnorderedContent()
CoreComponentIclearUnorderedContent in interface CoreComponentIpublic ComponentSetI getUnorderedContent()
CoreComponentIgetUnorderedContent in interface CoreComponentIpublic void setUnorderedContent(ComponentSetI newContent)
CoreComponentIsetUnorderedContent in interface CoreComponentIpublic void clearName()
CoreComponentIclearName in interface CoreComponentIpublic void clearAll()
CoreComponentIclearAll in interface CoreComponentIpublic void print()
CoreComponentIprint in interface CoreComponentIpublic abstract java.lang.String toString()
CoreComponentItoString in interface CoreComponentItoString in class java.lang.Objectpublic void setIsComplete(boolean _complete)
CoreComponentIsetIsComplete in interface CoreComponentIpublic boolean getIsComplete()
CoreComponentIgetIsComplete in interface CoreComponentIpublic abstract int getBasicType()
getBasicType in interface CoreComponentI
public boolean listen(CoreComponentI component)
               throws MOEException
CoreComponentIlisten in interface CoreComponentIpublic java.lang.Object clone()
clone in interface CoreComponentIclone in class java.lang.Object
public void annotate(java.lang.Object annotationType,
                     java.lang.Object annotation)
AnnotableIannotate in interface AnnotableIpublic void addAll(java.util.Map otherAnnotations)
addAll in interface AnnotableIpublic java.lang.Object getAnnotations(java.lang.Object ofAnnotationType)
AnnotableIgetAnnotations in interface AnnotableIpublic java.util.Map getAllAnnotations()
AnnotableIgetAllAnnotations in interface AnnotableIpublic boolean hasAnnotationOfType(java.lang.Object ofAnnotationType)
AnnotableIhasAnnotationOfType in interface AnnotableIpublic boolean hasAnnotation(java.lang.Object annotation)
AnnotableIhasAnnotation in interface AnnotableIpublic boolean hasAnnotations()
hasAnnotations in interface AnnotableIpublic java.util.Set getTypes()
AnnotableIgetTypes in interface AnnotableIpublic void removeAnnotation(java.lang.Object ofAnnotationType)
AnnotableIremoveAnnotation in interface AnnotableIpublic void removeAllAnnotations()
AnnotableIremoveAllAnnotations in interface AnnotableI
protected CoreComponentI add(CoreComponentI component,
                             CoreComponentI context)
                      throws MOEException
protected CoreComponentI textComponent()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||