Package com.sun.msv.writer.relaxng
Class PatternWriter
- java.lang.Object
-
- com.sun.msv.writer.relaxng.PatternWriter
-
- All Implemented Interfaces:
ExpressionVisitorVoid
public abstract class PatternWriter extends Object implements ExpressionVisitorVoid
Visits Expression and writes it as RELAX NG.
-
-
Constructor Summary
Constructors Constructor Description PatternWriter(Context ctxt)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
isPredefinedType(org.relaxng.datatype.Datatype x)
returns true if the specified type is a pre-defined XSD type without any facet.void
onAnyString()
void
onAttribute(AttributeExp exp)
void
onChoice(ChoiceExp exp)
void
onConcur(ConcurExp exp)
void
onData(DataExp exp)
void
onElement(ElementExp exp)
void
onEpsilon()
void
onInterleave(InterleaveExp exp)
void
onList(ListExp exp)
void
onMixed(MixedExp exp)
void
onNullSet()
void
onOneOrMore(OneOrMoreExp exp)
protected void
onOptional(Expression exp)
abstract void
onOther(OtherExp exp)
abstract void
onRef(ReferenceExp exp)
void
onSequence(SequenceExp exp)
void
onValue(ValueExp exp)
protected void
onZeroOrMore(OneOrMoreExp exp)
protected void
param(String name, String value)
protected void
serializeDataType(XSDatatype dt)
serializes the given datatype.protected void
serializeEnumeration(XSDatatypeImpl dt, EnumerationFacet enums)
serializes a type with enumeration.protected void
serializeListType(XSDatatypeImpl dt)
serializes a list type.protected void
serializeUnionType(UnionType dt)
serializes a union type.void
visitBinExp(String elementName, BinaryExp exp, Class type)
void
visitUnary(Expression exp)
print expression but surpress unnecessary sequence.
-
-
-
Constructor Detail
-
PatternWriter
public PatternWriter(Context ctxt)
-
-
Method Detail
-
onOther
public abstract void onOther(OtherExp exp)
- Specified by:
onOther
in interfaceExpressionVisitorVoid
-
onRef
public abstract void onRef(ReferenceExp exp)
- Specified by:
onRef
in interfaceExpressionVisitorVoid
-
onElement
public void onElement(ElementExp exp)
- Specified by:
onElement
in interfaceExpressionVisitorVoid
-
onEpsilon
public void onEpsilon()
- Specified by:
onEpsilon
in interfaceExpressionVisitorVoid
-
onNullSet
public void onNullSet()
- Specified by:
onNullSet
in interfaceExpressionVisitorVoid
-
onAnyString
public void onAnyString()
- Specified by:
onAnyString
in interfaceExpressionVisitorVoid
-
onInterleave
public void onInterleave(InterleaveExp exp)
- Specified by:
onInterleave
in interfaceExpressionVisitorVoid
-
onConcur
public void onConcur(ConcurExp exp)
- Specified by:
onConcur
in interfaceExpressionVisitorVoid
-
onList
public void onList(ListExp exp)
- Specified by:
onList
in interfaceExpressionVisitorVoid
-
onOptional
protected void onOptional(Expression exp)
-
onChoice
public void onChoice(ChoiceExp exp)
- Specified by:
onChoice
in interfaceExpressionVisitorVoid
-
onSequence
public void onSequence(SequenceExp exp)
- Specified by:
onSequence
in interfaceExpressionVisitorVoid
-
onMixed
public void onMixed(MixedExp exp)
- Specified by:
onMixed
in interfaceExpressionVisitorVoid
-
onOneOrMore
public void onOneOrMore(OneOrMoreExp exp)
- Specified by:
onOneOrMore
in interfaceExpressionVisitorVoid
-
onZeroOrMore
protected void onZeroOrMore(OneOrMoreExp exp)
-
onAttribute
public void onAttribute(AttributeExp exp)
- Specified by:
onAttribute
in interfaceExpressionVisitorVoid
-
visitUnary
public void visitUnary(Expression exp)
print expression but surpress unnecessary sequence.
-
onValue
public void onValue(ValueExp exp)
- Specified by:
onValue
in interfaceExpressionVisitorVoid
-
onData
public void onData(DataExp exp)
- Specified by:
onData
in interfaceExpressionVisitorVoid
-
serializeDataType
protected void serializeDataType(XSDatatype dt)
serializes the given datatype. The caller should generate events for <simpleType> element if necessary.
-
isPredefinedType
protected boolean isPredefinedType(org.relaxng.datatype.Datatype x)
returns true if the specified type is a pre-defined XSD type without any facet.
-
serializeUnionType
protected void serializeUnionType(UnionType dt)
serializes a union type. this method is called by serializeDataType method.
-
serializeListType
protected void serializeListType(XSDatatypeImpl dt)
serializes a list type. this method is called by serializeDataType method.
-
serializeEnumeration
protected void serializeEnumeration(XSDatatypeImpl dt, EnumerationFacet enums)
serializes a type with enumeration. this method is called by serializeDataType method.
-
-