public class OSLSchemaWriter extends Object implements SchemaWriterIF
Modifier and Type | Field and Description |
---|---|
protected LocatorIF |
base |
protected AttributesImpl |
EMPTY_ATTR_LIST |
protected String |
encoding |
protected Writer |
out |
Constructor and Description |
---|
OSLSchemaWriter(File file,
String encoding)
PUBLIC: Creates a schema writer bound to the given file.
|
OSLSchemaWriter(Writer out,
String encoding)
PUBLIC: Creates a schema writer bound to the given Writer object.
|
protected Writer out
protected String encoding
protected LocatorIF base
protected AttributesImpl EMPTY_ATTR_LIST
public OSLSchemaWriter(Writer out, String encoding)
encoding
- The encoding in which the schema will be written.public OSLSchemaWriter(File file, String encoding) throws IOException
encoding
- The encoding in which to write the file.IOException
public void write(SchemaIF schema) throws IOException
write
in interface SchemaWriterIF
IOException
- Thrown if there are problems writing
to the specified location.protected void export(OSLSchema schema, ContentHandler dh) throws SAXException
SAXException
protected void export(RuleSet ruleset, ContentHandler dh) throws SAXException
SAXException
protected void export(TopicClass klass, ContentHandler dh) throws SAXException
SAXException
protected void export(AssociationClass klass, ContentHandler dh) throws SAXException
SAXException
protected void export(TopicConstraintCollection constraint, ContentHandler dh) throws SAXException
SAXException
protected void export(TopicNameConstraint constraint, ContentHandler dh) throws SAXException
SAXException
protected void export(VariantConstraint constraint, ContentHandler dh) throws SAXException
SAXException
protected void export(OccurrenceConstraint constraint, ContentHandler dh) throws SAXException
SAXException
protected void export(TopicRoleConstraint constraint, ContentHandler dh) throws SAXException
SAXException
protected void export(AssociationRoleConstraint constraint, ContentHandler dh) throws SAXException
SAXException
protected void export(TMObjectMatcherIF matcher, ContentHandler dh) throws SAXException
SAXException
protected void exportScope(ScopedConstraintIF constraint, ContentHandler dh) throws SAXException
SAXException
protected void exportInstanceOf(TypeSpecification spec, ContentHandler dh) throws SAXException
SAXException
protected void exportMatchers(Collection matchers, ContentHandler dh) throws SAXException
SAXException
protected Attributes getAttributes(String name, String value)
protected Attributes getAttributes(boolean setting, String name, String tvalue, String fvalue)
protected Attributes getMinMax(CardinalityConstraintIF constraint)
protected void emptyElement(ContentHandler dh, String elem, Attributes atts) throws SAXException
SAXException