public class RelationMapping extends SAXTracker
Modifier and Type | Field and Description |
---|---|
protected File |
baseDirectory |
protected String |
commitMode |
protected ExpressionVirtualColumn |
curecol |
protected Entity |
curent |
protected Field |
curfield |
protected Relation |
currel |
protected Changelog |
cursync |
protected ValueIF |
curvcol |
protected Map<String,DataSourceIF> |
datasources |
protected Map<String,Prefix> |
iprefixes |
protected String |
name |
protected XMLReader |
reader |
protected Map<String,Relation> |
relations |
content, keepContentsOf, locator, openElements
characters, isParent, keepContentsOf, setDocumentLocator
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
protected XMLReader reader
protected String name
protected String commitMode
protected File baseDirectory
protected final Map<String,DataSourceIF> datasources
protected Relation currel
protected Entity curent
protected Field curfield
protected ValueIF curvcol
protected Changelog cursync
protected ExpressionVirtualColumn curecol
public void compile()
public void close()
protected static InputSource getRelaxNGSchema() throws IOException
IOException
public File getBaseDirectory()
public void setBaseDirectory(File baseDirectory)
public String getName()
public String getCommitMode()
public Collection<DataSourceIF> getDataSources()
public DataSourceIF getDataSource(String id)
public void addDataSource(String id, DataSourceIF datasource)
public Collection<Relation> getRelations()
public void addRelation(Relation relation)
public String getQueryDeclarations()
public static RelationMapping read(File file) throws IOException
IOException
public static RelationMapping readFromClasspath(String resource) throws IOException
IOException
public static RelationMapping read(InputStream istream, File basedir) throws IOException
IOException
public void startElement(String nsuri, String lname, String qname, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class SAXTracker
SAXException
public void endElement(String nsuri, String lname, String qname) throws SAXException
endElement
in interface ContentHandler
endElement
in class SAXTracker
SAXException
protected String getValue(Attributes attrs, String name)
protected String getValue(Attributes attrs, String name, String _default)
protected String[] getValues(Attributes attrs, String name)
protected String[] getValues(Attributes attrs, String plural, String singular)
protected void addAttribute(AttributesImpl atts, String name, String type, String value)
protected void addAttribute(AttributesImpl atts, String name, String type, String[] values)
public void write(Writer writer) throws SAXException
SAXException
public void write(Writer writer, String encoding) throws SAXException
SAXException
protected void write(ContentHandler dh) throws SAXException
SAXException
protected void outputEntities(Relation rel, ContentHandler dh) throws SAXException
SAXException
protected void outputFields(Entity entity, ContentHandler dh) throws SAXException
SAXException
protected void outputField(Field field, ContentHandler dh) throws SAXException
SAXException