electric.xml.io.complex
Class SimpleContent
java.lang.Object
electric.xml.io.Type
electric.xml.io.complex.SimpleContent
- All Implemented Interfaces:
- java.lang.Cloneable, electric.xml.io.accessors.IAccessible, IEXMLLoggingConstants, ILoggingConstants, electric.xml.io.model.IModel, INamed, IQNamed, ISchemaConstants
- public final class SimpleContent
- extends Type
- implements electric.xml.io.accessors.IAccessible, electric.xml.io.model.IModel
SimpleContent is a model group available for complexTypes. It
represents a simpleType that has attributes added onto it.
<complexType name="foo">
<simpleContent>
<extension base="xsd:string">
<attribute name="bar" type="xsd:int" />
</extension>
</simpleContent>
</complexType>
simpleContent with a containing only an <annotation>
will be read in, but processed as if it were an <extension>
containing the same <annotation>
- Author:
- webMethods
Fields inherited from interface electric.xml.io.schema.ISchemaConstants |
ABSTRACT, ALL, ANNOTATION, ANY, ANY_ATTRIBUTE, ANY_TYPE, ANY_URI, ARRAY, ARRAY_PREFIX, ARRAY_TYPE, ATTRIBUTE, ATTRIBUTE_FORM_DEFAULT, ATTRIBUTE_GROUP, BASE, BASE_64_BINARY, BOOLEAN, BYTE, CHOICE, COMPLEX_CONTENT, COMPLEX_TYPE, DATE_TIME, DECIMAL, DOMINANT_SIMPLE_TYPE_NAMES, DOUBLE, DURATION, ELEMENT, ELEMENT_FORM_DEFAULT, ENUMERATION, EXTENSION, FLOAT, FORM, FRACTION_DIGITS, GROUP, HEX_BINARY, HREF, ID, IMPORT, INCLUDE, INSTANCE_SUFFIX, INT, INTEGER, LENGTH, LONG, MAX_EXCLUSIVE, MAX_INCLUSIVE, MAX_LENGTH, MAX_OCCURS, MIN_EXCLUSIVE, MIN_INCLUSIVE, MIN_LENGTH, MIN_OCCURS, NAME, NAMESPACE, NIL, NILLABLE, NOTATION, NULL, ONE, PATTERN, POUND_ID, PROCESS_CONTENTS, QNAME, QUALIFIED, REDEFINE, REF, RESTRICTION, ROOT, SCHEMA, SCHEMA_LOCATION, SEQUENCE, SHORT, SIMPLE_CONTENT, SIMPLE_TYPE, SOAP_ENCODING, SOAP_ENCODING_ARRAY, SOAP12_ENCODING, SOAP12_ENCODING_ARRAY, SOAPENC, STAR, STRING, TARGET_NAMESPACE, TIME, TOTAL_DIGITS, TYPE, UNBOUNDED, UNQUALIFIED, UNSIGNED_SHORT, USE, VALUE, WHITESPACE, WSDL_ARRAY, WSDL_HTTP, WSDL_MIME, WSDL_NAMESPACE, WSDL_SOAP, XSD_BOOLEAN, XSD_BYTE, XSD_DOUBLE, XSD_FLOAT, XSD_INT, XSD_LONG, XSD_PREFIX, XSD_SHORT, XSD_STRING, XSD_UNSIGNED_SHORT, XSI_PREFIX, ZERO |
Fields inherited from interface electric.util.log.ILoggingConstants |
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT |
Methods inherited from class electric.xml.io.Type |
addAllDependencies, appendSchema, equals, findJavaClass, getJavaClassWithCheck, getName, getName, getName, getName, getNamespace, getNamespaces, getQName, getRuntimeType, getSchema, getSchemaElement, getType, getXSDPrefix, getXSIPrefix, isAnonymous, isDominant, isInhibit, isMultiReference, isStandard, setAnonymous, setDominant, setInhibit, setJavaClass, setJavaName, setName, setNamespaces, setSchema, useAnonymous, useSchemaElement, writeSchema, writeType |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface electric.xml.io.model.IModel |
setSchema |
SimpleContent
public SimpleContent(ComplexType complexType,
Element schema)
throws SchemaException
- Parameters:
complexType
- schema
-
- Throws:
SchemaException
getBaseType
public Type getBaseType()
throws SchemaException
- Throws:
SchemaException
addAttribute
public void addAttribute(SchemaAttribute attribute)
- Parameters:
attribute
-
getAttributes
public SchemaAttribute[] getAttributes()
addAttributeGroup
public void addAttributeGroup(electric.xml.io.model.AttributeGroup attributeGroup)
- Parameters:
attributeGroup
-
getAttributeGroups
public electric.xml.io.model.AttributeGroup[] getAttributeGroups()
addDependencies
public void addDependencies(java.util.Vector dependencies)
throws SchemaException
- Description copied from class:
Type
- Add all the types that this type depends on into the Vector.
A type depends on anything it extends from, and anything that it contains.
- Specified by:
addDependencies
in interface electric.xml.io.model.IModel
- Overrides:
addDependencies
in class Type
- Parameters:
dependencies
-
- Throws:
SchemaException
getSchemaElement
public SchemaElement getSchemaElement(java.lang.String name)
- Specified by:
getSchemaElement
in interface electric.xml.io.model.IModel
- Parameters:
name
-
getSchemaAttribute
public SchemaAttribute getSchemaAttribute(java.lang.String name)
- Specified by:
getSchemaAttribute
in interface electric.xml.io.model.IModel
- Parameters:
name
-
readSchema
public void readSchema(Element schema)
throws SchemaException
- Turn an element of the form complexType/simpleContent into
a SimpleContent object. Handle extensions, and restrictions
of the form restriction/annotation/appinfo.
- Overrides:
readSchema
in class Type
- Parameters:
schema
-
- Throws:
SchemaException
writeSchema
public void writeSchema(Element element,
boolean annotated)
throws SchemaException
- Description copied from class:
Type
- Append the schema for this type to the element passed in.
If annotated is true, attach map: attributes where appropriate.
- Specified by:
writeSchema
in interface electric.xml.io.model.IModel
- Overrides:
writeSchema
in class Type
- Parameters:
element
- annotated
-
- Throws:
SchemaException
getJavaClass
public java.lang.Class getJavaClass()
throws SchemaException
- Overrides:
getJavaClass
in class Type
- Returns:
- the javaClass that this type represents. Could return null.
- Throws:
SchemaException
getJavaName
public java.lang.String getJavaName()
throws SchemaException
- Description copied from class:
Type
- Return the javaName that this type represents.
See ArrayType for the throws.
- Overrides:
getJavaName
in class Type
- Throws:
SchemaException
writeJava
public void writeJava(JavaSource source)
throws SchemaException
- Description copied from class:
Type
- Write out a java representation of this class into the JavaSource.
- Specified by:
writeJava
in interface electric.xml.io.model.IModel
- Overrides:
writeJava
in class Type
- Parameters:
source
-
- Throws:
SchemaException
forceResolution
public void forceResolution()
- Description copied from interface:
electric.xml.io.model.IModel
- This method forces the resolution of refs in itself, and any entries
underneath it.
- Specified by:
forceResolution
in interface electric.xml.io.model.IModel
getAccessibleJavaClass
public java.lang.Class getAccessibleJavaClass()
throws SchemaException
- This is used during runtime for reflection on this type.
We want this to return the correct class.
- Specified by:
getAccessibleJavaClass
in interface electric.xml.io.accessors.IAccessible
- Throws:
SchemaException
getAccessibleJavaName
public java.lang.String getAccessibleJavaName()
throws SchemaException
- This is used to write out the java source for this type.
we want baseType value; defined in the class as it is being written.
- Specified by:
getAccessibleJavaName
in interface electric.xml.io.accessors.IAccessible
- Throws:
SchemaException
writeObject
public void writeObject(IWriter writer,
java.lang.Object object)
throws java.io.IOException
- Description copied from class:
Type
- Write out the object specified to the writer using this type.
- Specified by:
writeObject
in interface electric.xml.io.model.IModel
- Specified by:
writeObject
in class Type
- Parameters:
writer
- object
-
- Throws:
java.io.IOException
readObject
public void readObject(IReader reader,
Value value)
throws java.io.IOException
- Description copied from class:
Type
- Read in the object from the reader, and place it in the value.
- Specified by:
readObject
in interface electric.xml.io.model.IModel
- Specified by:
readObject
in class Type
- Parameters:
reader
- value
-
- Throws:
java.io.IOException
getAnnotation
public Element getAnnotation()
- Return any <annotation> element from the
setAnnotation
public void setAnnotation(Element annotation)
- Add an <annotation> element to the
- Parameters:
annotation
-
copyright© 2001-2004 by webMethods All Rights Reserved.