Java Doc for Schemas.java in  » GIS » GeoTools-2.4.1 » org » geotools » xml » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.xml.Schemas

Schemas
public class Schemas (Code)
Utility class for performing various opreations.
author:
   Justin Deoliveira, The Open Planning Project

Inner Class :static class SchemaLocatorAdapterFactory extends AdapterFactoryImpl
Inner Class :static class SchemaLocatorAdapter extends AdapterImpl implements XSDSchemaLocator
Inner Class :static class SchemaLocationResolverAdapterFactory extends AdapterFactoryImpl
Inner Class :static class SchemaLocationResolverAdapter extends AdapterImpl implements XSDSchemaLocationResolver



Method Summary
public static  ListfindSchemaLocationResolvers(Configuration configuration)
     Finds all XSDSchemaLocationResolver 's used by the configuration.
Parameters:
  configuration - The parser configuration.
final public static  SchemaIndexfindSchemas(Configuration configuration)
     Finds all the XSDSchemas used by the Configuration configuration by looking at the configuration's schema locator and its dependencies.
final public static  XSDAttributeDeclarationgetAttributeDeclaration(XSDElementDeclaration element, QName qName)
     Returns an attribute declaration that is contained in the type of another element declaration.
final public static  ListgetAttributeDeclarations(XSDElementDeclaration element)
     Returns a list of all attribute declarations declared in the type (or any base type) of the specified element.

This method is just a shortcut for Schemas.getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()


Parameters:
  element - The element.
final public static  ListgetAttributeDeclarations(XSDTypeDefinition type)
     Returns a list of all attribute declarations declared in the type (or any base type) of the specified element.
Parameters:
  element - The element.
final public static  XSDTypeDefinitiongetBaseTypeDefinition(XSDTypeDefinition type, QName parentTypeName)
     Returns the base type defintion of type named parentTypeName.

This method will handle the case in which the parentTypeName == type.getTypeName(). If no such parent type is found this method will return null.


Parameters:
  type - The type.
Parameters:
  parentTypeName - The name of the base type to return.
final public static  XSDElementDeclarationgetChildElementDeclaration(XSDElementDeclaration parent, QName qName)
     Returns an element declaration that is contained in the type of another element declaration.
final public static  ListgetChildElementDeclarations(XSDElementDeclaration element)
     Returns a list of all child element declarations of the specified element, no order is guaranteed.
Parameters:
  element - The parent element.
final public static  ListgetChildElementDeclarations(XSDTypeDefinition type)
     Returns a list of all child element declarations of the specified type, no order is guaranteed.
Parameters:
  type - The type.
final public static  ListgetChildElementDeclarations(XSDElementDeclaration element, boolean includeParents)
     Returns a list of all child element declarations of the specified element.

The includeParents flag controls if this method should returns those elements defined on parent types.


Parameters:
  element - The parent element.
Parameters:
  includeParents - Flag indicating if parent types should be processed.
final public static  ListgetChildElementDeclarations(XSDTypeDefinition type, boolean includeParents)
     Returns a list of all child element declarations of the specified type, no order is guaranteed.
final public static  XSDParticlegetChildElementParticle(XSDTypeDefinition type, String name, boolean includeParents)
     Returns the particle for an element declaration that is part of a type.
Parameters:
  type - The type definition.
Parameters:
  name - The naem of the child element declaration.
Parameters:
  includeParents - Flag to control wether parent types are included.
final public static  ListgetChildElementParticles(XSDTypeDefinition type, boolean includeParents)
     Returns a list of all child element particles that corresponde to element declarations of the specified type, no order is guaranteed.
public static  ListgetComponentInstancesOfType(PicoContainer container, Class clazz)
     Obtains all instances of a particular class from a container by navigating up the container hierachy.
Parameters:
  container - The container.
Parameters:
  clazz - The class.
final public static  ListgetDerivedElementDeclarations(XSDElementDeclaration element)
     Returns a list of all top level elements that are of a type derived from the type of the specified element.
Parameters:
  element - The element.
public static  XSDElementDeclarationgetElementDeclaration(XSDSchema schema, QName name)
     Searches schema for an element which matches name.
final public static  ListgetImports(XSDSchema schema)
     Returns a flat list of imports from the specified schema.

The method recurses into imported schemas.

final public static  ListgetIncludes(XSDSchema schema)
     Returns a flat list of includes from the specified schema.

The method recurses into included schemas.

final public static  intgetMaxOccurs(XSDComplexTypeDefinition type, XSDElementDeclaration element)
     Returns the minimum number of occurences of an element within a complex type.
Parameters:
  type - The type definition containg the declaration element
Parameters:
  element - The declaration of the element.
final public static  intgetMinOccurs(XSDComplexTypeDefinition type, XSDElementDeclaration element)
     Returns the minimum number of occurences of an element within a complex type.
Parameters:
  type - The type definition containg the declaration element
Parameters:
  element - The declaration of the element.
public static  StringgetTargetPrefix(XSDSchema schema)
     Returns the namespace prefix mapped to the targetNamespace of the schema.
Parameters:
  schema - The schema in question.
final public static  booleannameMatches(XSDNamedComponent component, QName qName)
     Method for comparing the name of a schema component to a qualified name. The component name and the qualified name match if both the namespaces match, and the local parts match.
final public static  XSDSchemaparse(String location)
     Parses a schema at the specified location.
Parameters:
  location - A uri pointing to the location of the schema.
final public static  XSDSchemaparse(String location, XSDSchemaLocator[] locators, XSDSchemaLocationResolver[] resolvers)
     Parses a schema at the specified location.
Parameters:
  location - A uri pointing to the location of the schema.
Parameters:
  locators - An array of schema locator objects to be used whenparsing imports/includes of the main schema.
Parameters:
  resolvers - An array of schema location resolvers used to overrideschema locations encountered in an instance document or an importedschema.
final public static  XSDSchemaparse(String location, List locators, List resolvers)
    
public static  voidunregisterComponent(PicoContainer container, Object key)
     Unregisters a component in the container and all parent containers.



Method Detail
findSchemaLocationResolvers
public static List findSchemaLocationResolvers(Configuration configuration)(Code)
Finds all XSDSchemaLocationResolver 's used by the configuration.
Parameters:
  configuration - The parser configuration. A list of location resolvers, empty if none found.



findSchemas
final public static SchemaIndex findSchemas(Configuration configuration)(Code)
Finds all the XSDSchemas used by the Configuration configuration by looking at the configuration's schema locator and its dependencies.
Parameters:
  configuration - the Configuration for which to find all itsrelated schemas a SchemaIndex holding the schemas related to configuration



getAttributeDeclaration
final public static XSDAttributeDeclaration getAttributeDeclaration(XSDElementDeclaration element, QName qName)(Code)
Returns an attribute declaration that is contained in the type of another element declaration.
Parameters:
  element - The containing element declaration.
Parameters:
  qName - The qualified name of the contained attribute The contained attribute declaration, or false if containment isnot satisfied.



getAttributeDeclarations
final public static List getAttributeDeclarations(XSDElementDeclaration element)(Code)
Returns a list of all attribute declarations declared in the type (or any base type) of the specified element.

This method is just a shortcut for Schemas.getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()


Parameters:
  element - The element. A list of @link XSDAttributeDeclaration objects, one for eachattribute of the element.



getAttributeDeclarations
final public static List getAttributeDeclarations(XSDTypeDefinition type)(Code)
Returns a list of all attribute declarations declared in the type (or any base type) of the specified element.
Parameters:
  element - The element. A list of @link XSDAttributeDeclaration objects, one for eachattribute of the element.



getBaseTypeDefinition
final public static XSDTypeDefinition getBaseTypeDefinition(XSDTypeDefinition type, QName parentTypeName)(Code)
Returns the base type defintion of type named parentTypeName.

This method will handle the case in which the parentTypeName == type.getTypeName(). If no such parent type is found this method will return null.


Parameters:
  type - The type.
Parameters:
  parentTypeName - The name of the base type to return. The base type, or null if it could not be found.



getChildElementDeclaration
final public static XSDElementDeclaration getChildElementDeclaration(XSDElementDeclaration parent, QName qName)(Code)
Returns an element declaration that is contained in the type of another element declaration. The following strategy is used to locate the child element declaration.
  1. The immediate children of the specified element are examined, if a match is found, it is returned.
  2. If 1. does not match, global elements that derive from the immediate children are examined.

Parameters:
  parent - the containing element declaration
Parameters:
  qName - the qualified name of the contained element The contained element declaration, or false if containment isnot satisfied.



getChildElementDeclarations
final public static List getChildElementDeclarations(XSDElementDeclaration element)(Code)
Returns a list of all child element declarations of the specified element, no order is guaranteed.
Parameters:
  element - The parent element. A list of @link XSDElementDeclaration objects, one for eachchild element.Schemas.getChildElementDeclarations(XSDTypeDefinition)



getChildElementDeclarations
final public static List getChildElementDeclarations(XSDTypeDefinition type)(Code)
Returns a list of all child element declarations of the specified type, no order is guaranteed.
Parameters:
  type - The type. A list of @link XSDElementDeclaration objects, one for eachchild element.



getChildElementDeclarations
final public static List getChildElementDeclarations(XSDElementDeclaration element, boolean includeParents)(Code)
Returns a list of all child element declarations of the specified element.

The includeParents flag controls if this method should returns those elements defined on parent types.


Parameters:
  element - The parent element.
Parameters:
  includeParents - Flag indicating if parent types should be processed. A list of @link XSDElementDeclaration objects, one for eachchild element.Schemas.getChildElementDeclarations(XSDTypeDefinition,boolean)



getChildElementDeclarations
final public static List getChildElementDeclarations(XSDTypeDefinition type, boolean includeParents)(Code)
Returns a list of all child element declarations of the specified type, no order is guaranteed.

The includeParents flag controls if this method should returns those elements defined on parent types.


Parameters:
  type - The type
Parameters:
  includeParents - flag indicating if parent types should be processed A list of @link XSDElementDeclaration objects, one for eachchild element.



getChildElementParticle
final public static XSDParticle getChildElementParticle(XSDTypeDefinition type, String name, boolean includeParents)(Code)
Returns the particle for an element declaration that is part of a type.
Parameters:
  type - The type definition.
Parameters:
  name - The naem of the child element declaration.
Parameters:
  includeParents - Flag to control wether parent types are included. The particle representing the element declaration, or null if it could not be found.



getChildElementParticles
final public static List getChildElementParticles(XSDTypeDefinition type, boolean includeParents)(Code)
Returns a list of all child element particles that corresponde to element declarations of the specified type, no order is guaranteed.

The includeParents flag controls if this method should returns those elements defined on parent types.


Parameters:
  type - THe type.
Parameters:
  includeParents - flag indicating if parent types should be processed A list of XSDParticle.



getComponentInstancesOfType
public static List getComponentInstancesOfType(PicoContainer container, Class clazz)(Code)
Obtains all instances of a particular class from a container by navigating up the container hierachy.
Parameters:
  container - The container.
Parameters:
  clazz - The class. A list of all instances of clazz, or the empty list if none found.



getDerivedElementDeclarations
final public static List getDerivedElementDeclarations(XSDElementDeclaration element)(Code)
Returns a list of all top level elements that are of a type derived from the type of the specified element.
Parameters:
  element - The element. All elements which are of a type derived from the type of thespecified element.



getElementDeclaration
public static XSDElementDeclaration getElementDeclaration(XSDSchema schema, QName name)(Code)
Searches schema for an element which matches name.
Parameters:
  schema - The schema
Parameters:
  name - The element to search for The element declaration, or null if it could not be found.



getImports
final public static List getImports(XSDSchema schema)(Code)
Returns a flat list of imports from the specified schema.

The method recurses into imported schemas. The list returned is filtered so that duplicate includes are removed. Two includes are considered equal if they have the same target namespace.


Parameters:
  schema - The top-level schema. A list containing objects of type XSDImport.



getIncludes
final public static List getIncludes(XSDSchema schema)(Code)
Returns a flat list of includes from the specified schema.

The method recurses into included schemas. The list returned is filtered so that duplicate includes are removed. Two includes are considered equal if they have the same uri location


Parameters:
  schema - The top-level schema. A list containing objects of type XSDInclude.



getMaxOccurs
final public static int getMaxOccurs(XSDComplexTypeDefinition type, XSDElementDeclaration element)(Code)
Returns the minimum number of occurences of an element within a complex type.
Parameters:
  type - The type definition containg the declaration element
Parameters:
  element - The declaration of the element. The minimum number of occurences.
throws:
  IllegalArgumentException - If the element declaration cannot belocaated withing the type definition.



getMinOccurs
final public static int getMinOccurs(XSDComplexTypeDefinition type, XSDElementDeclaration element)(Code)
Returns the minimum number of occurences of an element within a complex type.
Parameters:
  type - The type definition containg the declaration element
Parameters:
  element - The declaration of the element. The minimum number of occurences.
throws:
  IllegalArgumentException - If the element declaration cannot belocaated withing the type definition.



getTargetPrefix
public static String getTargetPrefix(XSDSchema schema)(Code)
Returns the namespace prefix mapped to the targetNamespace of the schema.
Parameters:
  schema - The schema in question. The namesapce prefix, or null if not found.



nameMatches
final public static boolean nameMatches(XSDNamedComponent component, QName qName)(Code)
Method for comparing the name of a schema component to a qualified name. The component name and the qualified name match if both the namespaces match, and the local parts match. Prefixes are ignored. Two strings will match if one of the following conditions hold.
  • Both strings are null.
  • Both strings are the empty string.
  • One string is null, and the other is the empty string.
  • Both strings are non-null and non-empty and equals() return true.

Parameters:
  component - The component in question.
Parameters:
  qName - The qualifined name.



parse
final public static XSDSchema parse(String location) throws IOException(Code)
Parses a schema at the specified location.
Parameters:
  location - A uri pointing to the location of the schema. The parsed schema, or null if the schema could not be parsed.
throws:
  IOException - In the event of a schema parsing error.



parse
final public static XSDSchema parse(String location, XSDSchemaLocator[] locators, XSDSchemaLocationResolver[] resolvers) throws IOException(Code)
Parses a schema at the specified location.
Parameters:
  location - A uri pointing to the location of the schema.
Parameters:
  locators - An array of schema locator objects to be used whenparsing imports/includes of the main schema.
Parameters:
  resolvers - An array of schema location resolvers used to overrideschema locations encountered in an instance document or an importedschema. The parsed schema, or null if the schema could not be parsed.
throws:
  IOException - In the event of a schema parsing error.



parse
final public static XSDSchema parse(String location, List locators, List resolvers) throws IOException(Code)



unregisterComponent
public static void unregisterComponent(PicoContainer container, Object key)(Code)
Unregisters a component in the container and all parent containers.
Parameters:
  container - The container.
Parameters:
  key - The key of the component.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.