|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The CoreComponent interface defines the bare minimum of functionality needed for objects to work with MOE.
version 0.01 is the initial release.
Field Summary | |
static int |
ATTRIBUTE
|
static int |
CDATA
|
static int |
CHARS
|
static int |
COMMENT
|
static int |
CONTAINER
|
static int |
DOCTYPE
|
static int |
DOCUMENT
|
static int |
ELEMENT
|
static int |
END_ATTRIBUTE
|
static int |
END_CDATA
|
static int |
END_COMMENT
|
static int |
END_CONTAINER
|
static int |
END_DOCTYPE
|
static int |
END_DOCUMENT
|
static int |
END_ELEMENT
|
static int |
END_NAMESPACE
|
static int |
END_PI
|
static int |
END_PROPERTY
|
static int |
GEN_ENTITY_END
|
static int |
GEN_ENTITY_REF
|
static int |
GEN_ENTITY_START
|
static int |
IG_WHITESPACE
|
static int |
NAMESPACE_DECL
|
static int |
PI
|
static int |
PROPERTY
|
static int |
UNPARSED
|
static int |
VALUE
|
static int |
XML_DECL
|
Method Summary | |
void |
addContent(CoreComponentI newComponent)
Adds content to this component. |
void |
addUnorderedContent(CoreComponentI newComponent)
Adds an unordered component (usually an attribute) to a component. |
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()
Returns a clean copy of the component and its contents. |
int |
getBasicType()
Returns the basic type of this object, per the constants defined in this interface. |
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. |
ComponentSetI |
getUnorderedContent()
Returns the unordered content for this component. |
int |
hashCode()
Returns a key which can be used as a unique identifier for this component. |
boolean |
listen(CoreComponentI component)
Accepts new events. |
void |
print()
Prints a representation of the component to STDOUT |
void |
setContent(ComponentListI newContent)
Sets the content for this component as a list of nodes. |
void |
setContent(java.lang.String newContent)
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 newLocalName)
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 newNsURI)
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 newPrefix)
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. |
java.lang.String |
toString()
Returns a representation of the component as a String. |
java.lang.String |
toString(ComponentSetI namespaceContext)
Returns a representation of the component as a String. |
Methods inherited from interface com.simonstl.moe.AnnotableI |
addAll, annotate, getAllAnnotations, getAnnotations, getTypes, hasAnnotation, hasAnnotationOfType, hasAnnotations, removeAllAnnotations, removeAnnotation |
Field Detail |
public static final int DOCUMENT
public static final int END_DOCUMENT
public static final int ELEMENT
public static final int END_ELEMENT
public static final int ATTRIBUTE
public static final int END_ATTRIBUTE
public static final int COMMENT
public static final int END_COMMENT
public static final int PI
public static final int END_PI
public static final int DOCTYPE
public static final int END_DOCTYPE
public static final int CDATA
public static final int END_CDATA
public static final int CONTAINER
public static final int END_CONTAINER
public static final int PROPERTY
public static final int END_PROPERTY
public static final int XML_DECL
public static final int NAMESPACE_DECL
public static final int END_NAMESPACE
public static final int GEN_ENTITY_START
public static final int GEN_ENTITY_END
public static final int GEN_ENTITY_REF
public static final int IG_WHITESPACE
public static final int CHARS
public static final int VALUE
public static final int UNPARSED
Method Detail |
public int hashCode()
hashCode
in interface NamingI
hashCode
in class java.lang.Object
public void setNsURI(java.lang.String newNsURI)
setNsURI
in interface NamingI
public java.lang.String getNsURI()
getNsURI
in interface NamingI
public void setLocalName(java.lang.String newLocalName)
setLocalName
in interface NamingI
public java.lang.String getLocalName()
getLocalName
in interface NamingI
public void setPrefix(java.lang.String newPrefix)
setPrefix
in interface NamingI
public java.lang.String getPrefix()
getPrefix
in interface NamingI
public java.lang.String getQName()
getQName
in interface NamingI
public void setQName(java.lang.String QName)
setQName
in interface NamingI
public NamingI getName()
public void setName(NamingI Name)
public CoreComponentI getParent()
public void setParent(CoreComponentI _parent)
public void setContent(java.lang.String newContent)
public void setContent(ComponentListI newContent)
public void addContent(CoreComponentI newComponent)
public void clearContent()
public java.lang.String getTextContent()
public ComponentListI getContent()
public void addUnorderedContent(CoreComponentI newComponent)
public void clearUnorderedContent()
public ComponentSetI getUnorderedContent()
public void setUnorderedContent(ComponentSetI newContent)
public void clearName()
public void clearAll()
public void print()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(ComponentSetI namespaceContext)
public void setIsComplete(boolean complete)
public boolean getIsComplete()
public int getBasicType()
public static final int DOCUMENT=0; public static final int END_DOCUMENT=1; public static final int ELEMENT=2; public static final int END_ELEMENT=3; public static final int ATTRIBUTE=4; public static final int END_ATTRIBUTE=5; public static final int CONTAINER=2; public static final int END_CONTAINER=3; public static final int PROPERTY=4; public static final int END_PROPERTY=5; public static final int COMMENT=6; public static final int END_COMMENT=7; public static final int PI=8; public static final int END_PI=9; public static final int DOCTYPE=10; public static final int END_DOCTYPE=11; public static final int CDATA=12; public static final int END_CDATA=13; public static final int XML_DECL=18; public static final int NAMESPACE_DECL=20; public static final int END_NAMESPACE=21; public static final int GENERIC=64; public static final int END_GENERIC=65; public static final int GENERIC_CONTENT=66; //for self-contained public static final int GEN_ENTITY_START=130; public static final int GEN_ENTITY_END=131; public static final int GEN_ENTITY_REF=250; public static final int IG_WHITESPACE=252; public static final int CHARS=254; public static final int VALUE=254; public static final int UNPARSED=258;While classof tests are useful, there may be many different implementations of each of the types, likely with different object hierarchies. This provides a simple form of self-identification.
public boolean listen(CoreComponentI component) throws MOEException
public java.lang.Object clone()
clone
in interface NamingI
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |