Package org.ow2.easywsdl.schema
Class DefaultSchemaImpl
- java.lang.Object
-
- org.ow2.easywsdl.schema.DefaultSchemaImpl
-
- All Implemented Interfaces:
Serializable,AbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>,Schema,SchemaElement,DefaultSchema
public final class DefaultSchemaImpl extends Object implements DefaultSchema
- Author:
- Nicolas Salatge - EBM WebSourcing
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(Attribute attr)voidaddElement(Element elmt)voidaddImport(Import importDef)Add an import to this parent.voidaddInclude(Include includeDef)Add an include to this parent.voidaddRedefine(Redefine redefineDef)voidaddType(Type absItfType)AttributecreateAttribute()TypecreateComplexType()DocumentationcreateDocumentation()Create the documentation element.ElementcreateElement()ImportcreateImport()Create an import to this parent.IncludecreateInclude()Create an include to this parent.RedefinecreateRedefine()TypecreateSimpleType()List<Element>findElementsInAllSchema(QName element)NamespaceMapperImplgetAllNamespaces()AttributegetAttribute(QName attr)org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoicegetAttributeFormDefault()List<Attribute>getAttributes()List<String>getBlockDefault()DocumentationgetDocumentation()Get the documentation element.URIgetDocumentURI()ElementgetElement(QName element)org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoicegetElementFormDefault()List<Element>getElements()List<String>getFinalDefault()List<Import>getImports()Get a map of lists containing all the imports defined here.List<Import>getImports(String namespaceURI)Get the list of imports for the specified namespaceURI.List<Include>getIncludes()Get a map of lists containing all the includes defined here.List<Include>getIncludes(URI locationURI)Get the list of includes for the specified locationURI.static DefaultSchemagetInstance()StringgetLang()Map<QName,String>getOtherAttributes()Get the map containing all the attributes defined on this element.List<Redefine>getRedefines()List<Redefine>getRedefines(String namespaceURI)StringgetTargetNamespace()TypegetType(QName type)TypegetTypeBoolean()TypegetTypeDateTime()TypegetTypeDouble()TypegetTypeDuration()TypegetTypeFloat()TypegetTypeInt()TypegetTypeInteger()TypegetTypeLong()List<Type>getTypes()TypegetTypeShort()TypegetTypeString()StringgetVersion()ImportremoveImport(Import importDef)Remove an import from this parent.IncluderemoveInclude(Include includeDef)Remove an include from this parent.RedefineremoveRedefine(Redefine redefineDef)voidsetAttributeFormDefault(org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoice form)voidsetDocumentation(Documentation doc)Set the documentation element for this document.voidsetDocumentURI(URI documentBaseURI)Set the document base URI of this definition.voidsetElementFormDefault(org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoice form)voidsetTargetNamespace(String tns)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ow2.easywsdl.schema.api.SchemaElement
equals, hashCode
-
-
-
-
Method Detail
-
getInstance
public static DefaultSchema getInstance()
-
getTypeInt
public Type getTypeInt()
- Specified by:
getTypeIntin interfaceDefaultSchema
-
getTypeString
public Type getTypeString()
- Specified by:
getTypeStringin interfaceDefaultSchema
-
getTypeDateTime
public Type getTypeDateTime()
- Specified by:
getTypeDateTimein interfaceDefaultSchema
-
getTypeBoolean
public Type getTypeBoolean()
- Specified by:
getTypeBooleanin interfaceDefaultSchema
-
getTypes
public List<Type> getTypes()
- Specified by:
getTypesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Specified by:
getTypesin interfaceDefaultSchema- Returns:
-
getType
public Type getType(QName type)
- Specified by:
getTypein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Specified by:
getTypein interfaceDefaultSchema
-
getTypeDouble
public Type getTypeDouble()
- Specified by:
getTypeDoublein interfaceDefaultSchema
-
getTypeDuration
public Type getTypeDuration()
- Specified by:
getTypeDurationin interfaceDefaultSchema
-
getTypeFloat
public Type getTypeFloat()
- Specified by:
getTypeFloatin interfaceDefaultSchema
-
getTypeInteger
public Type getTypeInteger()
- Specified by:
getTypeIntegerin interfaceDefaultSchema
-
getTypeLong
public Type getTypeLong()
- Specified by:
getTypeLongin interfaceDefaultSchema
-
getTypeShort
public Type getTypeShort()
- Specified by:
getTypeShortin interfaceDefaultSchema
-
addAttribute
public void addAttribute(Attribute attr)
- Specified by:
addAttributein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
addElement
public void addElement(Element elmt)
- Specified by:
addElementin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
addImport
public void addImport(Import importDef)
Description copied from interface:AbsItfSchemaAdd an import to this parent.
-
addInclude
public void addInclude(Include includeDef) throws SchemaException
Description copied from interface:AbsItfSchemaAdd an include to this parent.- Specified by:
addIncludein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Parameters:
includeDef- the include to be added- Throws:
SchemaException- if an included element can't be retrieved
-
addRedefine
public void addRedefine(Redefine redefineDef)
- Specified by:
addRedefinein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
addType
public void addType(Type absItfType)
-
createAttribute
public Attribute createAttribute()
- Specified by:
createAttributein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
createComplexType
public Type createComplexType()
- Specified by:
createComplexTypein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
createElement
public Element createElement()
- Specified by:
createElementin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
createImport
public Import createImport() throws SchemaException
Description copied from interface:AbsItfSchemaCreate an import to this parent.- Specified by:
createImportin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Throws:
SchemaException- if an imported element can't be retrieved
-
createInclude
public Include createInclude() throws SchemaException
Description copied from interface:AbsItfSchemaCreate an include to this parent.- Specified by:
createIncludein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Throws:
SchemaException- if an included element can't be retrieved
-
createRedefine
public Redefine createRedefine() throws SchemaException
- Specified by:
createRedefinein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Throws:
SchemaException
-
createSimpleType
public Type createSimpleType()
- Specified by:
createSimpleTypein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
findElementsInAllSchema
public List<Element> findElementsInAllSchema(QName element)
- Specified by:
findElementsInAllSchemain interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getAllNamespaces
public NamespaceMapperImpl getAllNamespaces()
- Specified by:
getAllNamespacesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getAttribute
public Attribute getAttribute(QName attr)
- Specified by:
getAttributein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getAttributes
public List<Attribute> getAttributes()
- Specified by:
getAttributesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getBlockDefault
public List<String> getBlockDefault()
- Specified by:
getBlockDefaultin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getDocumentURI
public URI getDocumentURI()
- Specified by:
getDocumentURIin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getElement
public Element getElement(QName element)
- Specified by:
getElementin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getElements
public List<Element> getElements()
- Specified by:
getElementsin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getFinalDefault
public List<String> getFinalDefault()
- Specified by:
getFinalDefaultin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getImports
public List<Import> getImports(String namespaceURI)
Description copied from interface:AbsItfSchemaGet the list of imports for the specified namespaceURI.- Specified by:
getImportsin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Parameters:
namespaceURI- the namespaceURI associated with the desired imports.- Returns:
- a list of the corresponding imports, or null if there weren't any matching imports
-
getImports
public List<Import> getImports()
Description copied from interface:AbsItfSchemaGet a map of lists containing all the imports defined here. The map's keys are the namespaceURIs, and the map's values are lists. There is one list for each namespaceURI for which imports have been defined.- Specified by:
getImportsin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getIncludes
public List<Include> getIncludes(URI locationURI) throws URISyntaxException
Description copied from interface:AbsItfSchemaGet the list of includes for the specified locationURI.- Specified by:
getIncludesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Parameters:
locationURI- the locationURI associated with the desired includes.- Returns:
- a list of the corresponding includes, or null if there weren't any matching includes
- Throws:
URISyntaxException- The schemaLocation definition of an include of the schema is invalid.
-
getIncludes
public List<Include> getIncludes()
Description copied from interface:AbsItfSchemaGet a map of lists containing all the includes defined here. The map's keys are the namespaceURIs, and the map's values are lists. There is one list for each locationURI for which imports have been defined.- Specified by:
getIncludesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getRedefines
public List<Redefine> getRedefines(String namespaceURI)
- Specified by:
getRedefinesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getRedefines
public List<Redefine> getRedefines()
- Specified by:
getRedefinesin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getLang
public String getLang()
-
getTargetNamespace
public String getTargetNamespace()
- Specified by:
getTargetNamespacein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
removeImport
public Import removeImport(Import importDef)
Description copied from interface:AbsItfSchemaRemove an import from this parent.- Specified by:
removeImportin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Parameters:
importDef- the import to be removed- Returns:
- the removed ImportImpl
-
removeInclude
public Include removeInclude(Include includeDef) throws SchemaException
Description copied from interface:AbsItfSchemaRemove an include from this parent.- Specified by:
removeIncludein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Parameters:
includeDef- the include to be removed- Returns:
- the removed include
- Throws:
SchemaException
-
removeRedefine
public Redefine removeRedefine(Redefine redefineDef)
- Specified by:
removeRedefinein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
setDocumentURI
public void setDocumentURI(URI documentBaseURI)
Description copied from interface:AbsItfSchemaSet the document base URI of this definition. Can be used to represent the origin of the Definition, and can be exploited when resolving relative URIs (e.g. in <import>s).- Specified by:
setDocumentURIin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>- Parameters:
documentBaseURI- the document base URI of this definition
-
setTargetNamespace
public void setTargetNamespace(String tns)
- Specified by:
setTargetNamespacein interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getOtherAttributes
public Map<QName,String> getOtherAttributes() throws XmlException
Description copied from interface:SchemaElementGet the map containing all the attributes defined on this element. The keys are the qnames of the attributes.- Specified by:
getOtherAttributesin interfaceSchemaElement- Returns:
- a map containing all the attributes defined on this element
- Throws:
XmlException
-
setDocumentation
public void setDocumentation(Documentation doc)
Description copied from interface:SchemaElementSet the documentation element for this document.- Specified by:
setDocumentationin interfaceSchemaElement- Parameters:
doc- the documentation element
-
getAttributeFormDefault
public org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoice getAttributeFormDefault()
- Specified by:
getAttributeFormDefaultin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
getElementFormDefault
public org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoice getElementFormDefault()
- Specified by:
getElementFormDefaultin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
setAttributeFormDefault
public void setAttributeFormDefault(org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoice form)
- Specified by:
setAttributeFormDefaultin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
setElementFormDefault
public void setElementFormDefault(org.ow2.easywsdl.schema.org.w3._2001.xmlschema.FormChoice form)
- Specified by:
setElementFormDefaultin interfaceAbsItfSchema<Type,Element,Attribute,Include,Import,Redefine>
-
createDocumentation
public Documentation createDocumentation()
Description copied from interface:SchemaElementCreate the documentation element.- Specified by:
createDocumentationin interfaceSchemaElement- Returns:
- the documentation element
-
getDocumentation
public Documentation getDocumentation()
Description copied from interface:SchemaElementGet the documentation element.- Specified by:
getDocumentationin interfaceSchemaElement- Returns:
- the documentation element
-
-