public abstract class PatternWriter extends java.lang.Object implements ExpressionVisitorVoid
Modifier and Type | Field and Description |
---|---|
protected Context |
context |
protected XMLWriter |
writer |
Constructor and Description |
---|
PatternWriter(Context ctxt) |
Modifier and Type | Method and 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(java.lang.String name,
java.lang.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(java.lang.String elementName,
BinaryExp exp,
java.lang.Class type) |
void |
visitUnary(Expression exp)
print expression but surpress unnecessary sequence.
|
public PatternWriter(Context ctxt)
public abstract void onOther(OtherExp exp)
onOther
in interface ExpressionVisitorVoid
public abstract void onRef(ReferenceExp exp)
onRef
in interface ExpressionVisitorVoid
public void onElement(ElementExp exp)
onElement
in interface ExpressionVisitorVoid
public void onEpsilon()
onEpsilon
in interface ExpressionVisitorVoid
public void onNullSet()
onNullSet
in interface ExpressionVisitorVoid
public void onAnyString()
onAnyString
in interface ExpressionVisitorVoid
public void onInterleave(InterleaveExp exp)
onInterleave
in interface ExpressionVisitorVoid
public void onConcur(ConcurExp exp)
onConcur
in interface ExpressionVisitorVoid
public void onList(ListExp exp)
onList
in interface ExpressionVisitorVoid
protected void onOptional(Expression exp)
public void onChoice(ChoiceExp exp)
onChoice
in interface ExpressionVisitorVoid
public void onSequence(SequenceExp exp)
onSequence
in interface ExpressionVisitorVoid
public void visitBinExp(java.lang.String elementName, BinaryExp exp, java.lang.Class type)
public void onMixed(MixedExp exp)
onMixed
in interface ExpressionVisitorVoid
public void onOneOrMore(OneOrMoreExp exp)
onOneOrMore
in interface ExpressionVisitorVoid
protected void onZeroOrMore(OneOrMoreExp exp)
public void onAttribute(AttributeExp exp)
onAttribute
in interface ExpressionVisitorVoid
public void visitUnary(Expression exp)
public void onValue(ValueExp exp)
onValue
in interface ExpressionVisitorVoid
public void onData(DataExp exp)
onData
in interface ExpressionVisitorVoid
protected void serializeDataType(XSDatatype dt)
protected void param(java.lang.String name, java.lang.String value)
protected boolean isPredefinedType(org.relaxng.datatype.Datatype x)
protected void serializeUnionType(UnionType dt)
protected void serializeListType(XSDatatypeImpl dt)
protected void serializeEnumeration(XSDatatypeImpl dt, EnumerationFacet enums)