|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ws4d.java.schema.Schema
public class Schema
General XML Schema class.
Field Summary | |
---|---|
static Type |
ANY_TYPE
|
Fields inherited from interface org.ws4d.java.schema.Any |
---|
ATTRIBUTE_NAME, ATTRIBUTE_TYPE, ATTRIBUTE_VALUE_FALSE, ATTRIBUTE_VALUE_TRUE, TAG_ANY, TAG_ANYATTRIBUTE |
Method Summary | |
---|---|
void |
addImport(java.lang.String targetNamespace,
java.lang.String location)
Adds an import information to this schema. |
void |
addInclude(java.lang.String schemaLocation)
|
void |
addType(Type t)
|
static void |
flushSchemaCache()
Removes all entries from the schema cache. |
int |
getAttributCount()
|
Attribute |
getAttribute(QName name)
|
Attribute |
getAttribute(java.lang.String name,
java.lang.String namespace)
|
AttributeGroup |
getAttributeGroup(QName name)
|
AttributeGroup |
getAttributeGroup(java.lang.String name,
java.lang.String namespace)
|
int |
getAttributeGroupCount()
|
Iterator |
getAttributes()
|
InternetMediaType |
getContentType()
Returns the content type of this resource. |
Element |
getElement(QName name)
|
Element |
getElement(java.lang.String name,
java.lang.String namespace)
|
int |
getElementCount()
|
Iterator |
getElements()
|
Group |
getGroup(QName name)
|
Group |
getGroup(java.lang.String name,
java.lang.String namespace)
|
int |
getGroupCount()
|
HashMap |
getHeaderFields()
Returns additional header fields for this resource. |
HashMap |
getImports()
|
Set |
getIncludes()
|
long |
getLastModifiedDate()
Returns the last time where this resource was modified as UNIX timestamp. |
Iterator |
getLinkedSchemas()
|
Notation |
getNotation(java.lang.String name)
|
int |
getNotationCount()
|
int |
getSchemaIdentifier()
|
java.lang.String |
getTargetNamespace()
|
Type |
getType(QName name)
|
Type |
getType(java.lang.String name,
java.lang.String namespace)
|
int |
getTypeCount()
|
Iterator |
getTypes()
|
static Schema |
parse(java.io.InputStream in,
URI fromUri,
boolean loadReferencedFiles)
|
static Schema |
parse(URI fromUri)
|
static Schema |
parse(URI fromUri,
boolean loadReferencedFiles)
|
static Schema |
parse(org.xmlpull.v1.XmlPullParser parser,
URI fromUri,
java.lang.String targetNamespace,
boolean loadReferencedFiles)
|
void |
removeImport(java.lang.String targetNamespace)
Removes an import from this schema. |
void |
serialize(URI request,
RequestHeader requestHeader,
java.io.InputStream requestBody,
java.io.OutputStream out)
Serializes this resource to the given output stream out . |
void |
serialize(org.xmlpull.v1.XmlSerializer serializer)
|
java.lang.String |
shortDescription()
A short string representation of this resource. |
long |
size()
The size of the resource. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Type ANY_TYPE
Method Detail |
---|
public static void flushSchemaCache()
public static Schema parse(org.xmlpull.v1.XmlPullParser parser, URI fromUri, java.lang.String targetNamespace, boolean loadReferencedFiles) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException, SchemaException
org.xmlpull.v1.XmlPullParserException
java.io.IOException
SchemaException
public static Schema parse(URI fromUri) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException, SchemaException
org.xmlpull.v1.XmlPullParserException
java.io.IOException
SchemaException
public static Schema parse(URI fromUri, boolean loadReferencedFiles) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException, SchemaException
org.xmlpull.v1.XmlPullParserException
java.io.IOException
SchemaException
public static Schema parse(java.io.InputStream in, URI fromUri, boolean loadReferencedFiles) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException, SchemaException
org.xmlpull.v1.XmlPullParserException
java.io.IOException
SchemaException
public java.lang.String toString()
toString
in class java.lang.Object
public int getSchemaIdentifier()
getSchemaIdentifier
in interface Any
public InternetMediaType getContentType()
Resource
If it is not possible to determinate the content type of the resource,
the Resource.getContentType()
method should return at least the
application/octet-stream content type.
getContentType
in interface Resource
public void serialize(URI request, RequestHeader requestHeader, java.io.InputStream requestBody, java.io.OutputStream out) throws java.io.IOException
Resource
out
.
serialize
in interface Resource
request
- the request URIrequestHeader
- the header of the requestrequestBody
- makes the content of the request body availableout
- the outputs stream to serialize this resource over
java.io.IOException
- if an IO failure occurs during serializationpublic long size()
Resource
If it is not possible to determinate the size of the resource. The
implementation should return -1
. This will allow to send the
resource as chunked content.
size
in interface Resource
public java.lang.String getTargetNamespace()
public Iterator getLinkedSchemas()
public Iterator getElements()
public Element getElement(QName name)
public Element getElement(java.lang.String name, java.lang.String namespace)
public int getElementCount()
public Iterator getTypes()
public Type getType(java.lang.String name, java.lang.String namespace)
public Type getType(QName name)
public int getTypeCount()
public Iterator getAttributes()
public Attribute getAttribute(java.lang.String name, java.lang.String namespace)
public Attribute getAttribute(QName name)
public int getAttributCount()
public Group getGroup(java.lang.String name, java.lang.String namespace)
public Group getGroup(QName name)
public int getGroupCount()
public AttributeGroup getAttributeGroup(java.lang.String name, java.lang.String namespace)
public AttributeGroup getAttributeGroup(QName name)
public int getAttributeGroupCount()
public Notation getNotation(java.lang.String name)
public int getNotationCount()
public void addImport(java.lang.String targetNamespace, java.lang.String location)
targetNamespace
- the target namespace of the imported schema.location
- the location.public void removeImport(java.lang.String targetNamespace)
targetNamespace
- the target namespace of the import.public HashMap getImports()
public void addInclude(java.lang.String schemaLocation)
public Set getIncludes()
public void serialize(org.xmlpull.v1.XmlSerializer serializer) throws java.io.IOException
java.io.IOException
public void addType(Type t)
public HashMap getHeaderFields()
Resource
The additional header fields allow to add header fields to the response which will be created to send this resource.
NOTICE: The map must contain a String
,
String
mapping.
getHeaderFields
in interface Resource
public java.lang.String shortDescription()
Resource
shortDescription
in interface Resource
public long getLastModifiedDate()
Resource
getLastModifiedDate
in interface Resource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |