|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.bind.validator.MSVValidator
public class MSVValidator
XMLSerializer that calls the native interface of MSV and performs validation. Used in a pair with a ValidationContext.
| Field Summary | |
|---|---|
static String |
DUMMY_ELEMENT_NS
Deprecated. namespace URI of dummy elements. |
| Method Summary | |
|---|---|
void |
childAsAttributeBodies(XMLSerializable o)
Deprecated. This method is called when an XMLSerializable object is found while the marshaller is in the "attribute body" mode (i.e. |
void |
childAsAttributes(XMLSerializable o)
Deprecated. This method is called when an XMLSerializable object is found while the marshaller is in the "attribute" mode (i.e. |
void |
childAsElements(XMLSerializable o)
Deprecated. This method is called when an XMLSerializable object is found while the marshaller is in the "element" mode (i.e. |
void |
endAttribute()
Deprecated. |
void |
endAttributes()
Deprecated. Switches to the mode to marshal child texts/elements. |
void |
endElement()
Deprecated. Ends marshalling of an element. |
String |
getBaseUri()
Deprecated. Returns the base URI of the context. |
NamespaceContext2 |
getNamespaceContext()
Deprecated. Obtains a namespace context object, which is used to declare/obtain namespace bindings. |
boolean |
isNotation(String notation)
Deprecated. Checks if a notation is declared with the specified name. |
boolean |
isUnparsedEntity(String entityName)
Deprecated. Checks if an unparsed entity is declared with the specified name. |
void |
onID(Datatype dt,
String s)
Deprecated. |
String |
onID(String value)
Deprecated. Notifies the serializer that an ID value has just marshalled. |
String |
onIDREF(String value)
Deprecated. Notifies the serializer that an IDREF value has just marshalled. |
void |
reportError(ValidationEvent e)
Deprecated. Errors detected by the XMLSerializable should be either thrown as SAXException or reported through this method. |
String |
resolveNamespacePrefix(String prefix)
Deprecated. Resolves a namespace prefix to the corresponding namespace URI. |
void |
startAttribute(String uri,
String local)
Deprecated. Starts marshalling of an attribute. |
void |
startElement(String uri,
String local)
Deprecated. Starts marshalling of an element. |
void |
text(String text)
Deprecated. Marshalls text. |
static void |
validate(com.sun.xml.bind.validator.ValidationContext context,
ValidatableObject vo)
Deprecated. Validates the specified object and reports any error to the context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DUMMY_ELEMENT_NS
| Method Detail |
|---|
public NamespaceContext2 getNamespaceContext()
XMLSerializer
getNamespaceContext in interface XMLSerializer
public static void validate(com.sun.xml.bind.validator.ValidationContext context,
ValidatableObject vo)
throws SAXException
SAXException
public void endAttributes()
throws SAXException
XMLSerializer
endAttributes in interface XMLSerializerSAXException
public final void text(String text)
throws SAXException
XMLSerializerThis method can be called (i) after the startAttribute method and (ii) before the endAttribute method, to marshal attribute values. If the method is called more than once, those texts are considered as separated by whitespaces. For example,
c.startAttribute();
c.text("abc");
c.text("def");
c.endAttribute("","foo");
will generate foo="abc def".
Similarly, this method can be called after the endAttributes method to marshal texts inside elements. The same rule about multiple invokations apply to this case, too. For example,
c.startElement("","foo");
c.endAttributes();
c.text("abc");
c.text("def");
c.startElement("","bar");
c.endAttributes();
c.endElement();
c.text("ghi");
c.endElement();
will generate <foo>abc def<bar/>ghi</foo>.
text in interface XMLSerializerSAXException
public void startAttribute(String uri,
String local)
XMLSerializer
startAttribute in interface XMLSerializer
public void endAttribute()
throws SAXException
endAttribute in interface XMLSerializerSAXException
public void startElement(String uri,
String local)
throws SAXException
XMLSerializer
startElement in interface XMLSerializerSAXException
public void endElement()
throws SAXException
XMLSerializer
endElement in interface XMLSerializerSAXException
public void childAsAttributes(XMLSerializable o)
throws SAXException
XMLSerializer
childAsAttributes in interface XMLSerializerSAXException
public void childAsElements(XMLSerializable o)
throws SAXException
XMLSerializer
childAsElements in interface XMLSerializerSAXException
public void childAsAttributeBodies(XMLSerializable o)
throws SAXException
XMLSerializer
childAsAttributeBodies in interface XMLSerializerSAXException
public void reportError(ValidationEvent e)
throws AbortSerializationException
XMLSerializerSAXException or reported through this method.
The callee should report an error to the client application
and
reportError in interface XMLSerializerAbortSerializationException
public String onID(String value)
throws SAXException
XMLSerializer
onID in interface XMLSerializerSAXException
public String onIDREF(String value)
throws SAXException
XMLSerializer
onIDREF in interface XMLSerializerSAXExceptionpublic String getBaseUri()
ValidationContext
getBaseUri in interface ValidationContextpublic boolean isUnparsedEntity(String entityName)
ValidationContext
isUnparsedEntity in interface ValidationContextpublic boolean isNotation(String notation)
ValidationContext
isNotation in interface ValidationContext
public void onID(Datatype dt,
String s)
onID in interface com.sun.msv.grammar.IDContextProviderpublic String resolveNamespacePrefix(String prefix)
ValidationContextIf the prefix is "" (empty string), it indicates an unprefixed value. The callee should resolve it as for an unprefixed element, rather than for an unprefixed attribute.
If the prefix is "xml", then the callee must resolve this prefix into "http://www.w3.org/XML/1998/namespace", as defined in the XML Namespaces Recommendation.
resolveNamespacePrefix in interface ValidationContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||