Commit 6da752cf authored by Vincent Calame's avatar Vincent Calame

Remplacement de la bibliothèque xpp3 par SAX

parent 8ddbd1cb
......@@ -11,7 +11,6 @@ package net.scrutari.xml;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import net.mapeadores.util.attr.AttributeKey;
import net.mapeadores.util.logging.MessageHandler;
import net.mapeadores.util.text.CleanedString;
......@@ -19,6 +18,7 @@ import net.mapeadores.util.text.StringChecker;
import net.mapeadores.util.xml.handlers.DefaultElementHandler;
import net.mapeadores.util.xml.handlers.ElementHandler;
import net.mapeadores.util.xml.handlers.SimpleElementHandler;
import org.xml.sax.Attributes;
/**
......@@ -43,7 +43,7 @@ class AttrHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
switch (tagname) {
case "val":
return new SimpleElementHandler(VALUE);
......
......@@ -12,7 +12,6 @@ package net.scrutari.xml;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.text.ParseException;
import java.util.Map;
import net.mapeadores.util.attr.AttributeKey;
import net.mapeadores.util.localisation.Lang;
import net.mapeadores.util.logging.ErrorMessageException;
......@@ -24,6 +23,7 @@ import net.mapeadores.util.xml.handlers.SimpleElementHandler;
import net.scrutari.data.BaseData;
import net.scrutari.data.DataConstants;
import net.scrutari.data.DataValidator;
import org.xml.sax.Attributes;
/**
......@@ -48,7 +48,7 @@ class BaseMetadataHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
String tagXpath = xpath + "/" + tagname;
switch (tagname) {
case "base-icon":
......@@ -60,7 +60,7 @@ class BaseMetadataHandler extends DefaultElementHandler {
case "langs-ui":
return new AvailableLangHandler(baseDataBuilder, messageHandler, tagXpath);
case "attr":
AttributeKey attributeKey = SctXmlUtils.parseAttributeKey(attributeMap, messageHandler, tagXpath);
AttributeKey attributeKey = SctXmlUtils.parseAttributeKey(attributes, messageHandler, tagXpath);
if (attributeKey != null) {
return new AttrHandler(attributeKey, messageHandler, SctXmlUtils.toXpath(tagXpath, attributeKey), dataValidator.getFormatChecker(attributeKey));
} else {
......@@ -111,10 +111,10 @@ class BaseMetadataHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
if (tagname.equals("lib")) {
try {
return new LabelElementHandler(attributeMap, xpath + "/" + tagname);
return new LabelElementHandler(attributes, xpath + "/" + tagname);
} catch (ErrorMessageException eme) {
SctXmlUtils.lang(messageHandler, eme.getErrorMessage());
return null;
......@@ -144,7 +144,7 @@ class BaseMetadataHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
if (tagname.equals("lang")) {
return new SimpleElementHandler(LANG);
}
......
......@@ -9,13 +9,13 @@
package net.scrutari.xml;
import java.util.Map;
import net.mapeadores.util.logging.MessageHandler;
import net.mapeadores.util.xml.DomMessages;
import net.mapeadores.util.xml.handlers.DefaultElementHandler;
import net.mapeadores.util.xml.handlers.ElementHandler;
import net.mapeadores.util.xml.handlers.SimpleElementHandler;
import net.scrutari.datauri.BaseURI;
import org.xml.sax.Attributes;
/**
......@@ -36,7 +36,7 @@ class BaseURIHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
if ((tagname.equals("authority")) || (tagname.equals("authority-uuid"))) {
return new SimpleElementHandler(AUTHORITY);
}
......
......@@ -11,13 +11,16 @@ package net.scrutari.xml;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import net.mapeadores.util.exceptions.NestedLibraryException;
import net.mapeadores.util.logging.MessageHandler;
import net.mapeadores.util.xml.DomMessages;
import net.scrutari.datauri.BaseURI;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
......@@ -29,69 +32,102 @@ public class BaseURIXmlEngine {
private static final short START = 0;
private static final short ON_BASE = 1;
private static final short ON_METADATA = 2;
private final XmlPullParserFactory factory;
private final SAXParserFactory factory;
private final MessageHandler messageHandler;
public BaseURIXmlEngine(MessageHandler messageHandler) {
this.messageHandler = messageHandler;
this.factory = SAXParserFactory.newInstance();
}
public BaseURI read(InputStream inputStream) throws SAXException, IOException {
SAXParser saxParser;
try {
saxParser = factory.newSAXParser();
} catch (ParserConfigurationException pce) {
throw new NestedLibraryException(pce);
}
try {
this.factory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null);
} catch (XmlPullParserException xppe) {
throw new NestedLibraryException(xppe);
saxParser.parse(inputStream, new SaxHandler());
} catch (StopException stopException) {
return stopException.getBaseURI();
}
return null;
}
private void xml(String key, Object... values) {
DomMessages.invalid(messageHandler, key, values);
}
public BaseURI read(InputStream inputStream) throws XmlPullParserException, IOException {
XmlPullParser xpp = factory.newPullParser();
xpp.setInput(inputStream, null);
private class SaxHandler extends DefaultHandler {
BaseURIHandler metadataHandler = null;
short state = START;
int eventType = xpp.getEventType();
do {
if (eventType == XmlPullParser.START_TAG) {
String tagName = xpp.getName();
switch (state) {
case START:
if (tagName.equals("base")) {
state = ON_BASE;
break;
} else {
xml("_ error.wrong.xml.root", tagName, "base");
return null;
}
case ON_BASE:
if (tagName.equals("base-metadata")) {
state = ON_METADATA;
metadataHandler = new BaseURIHandler(messageHandler);
break;
} else {
xml("_ error.unsupported.xml.missingtag", "/base", "base-metadata");
return null;
}
case ON_METADATA:
metadataHandler.processStartElement(tagName, null);
break;
}
} else if (eventType == XmlPullParser.END_TAG) {
if (metadataHandler != null) {
boolean done = metadataHandler.processEndElement(xpp.getName());
if (done) {
return metadataHandler.getBaseURI();
private SaxHandler() {
}
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
switch (state) {
case START:
if (qName.equals("base")) {
state = ON_BASE;
break;
} else {
xml("_ error.wrong.xml.root", qName, "base");
throw new StopException(null);
}
}
} else if (eventType == XmlPullParser.TEXT) {
if (metadataHandler != null) {
metadataHandler.processText(xpp.getText());
case ON_BASE:
if (qName.equals("base-metadata")) {
state = ON_METADATA;
metadataHandler = new BaseURIHandler(messageHandler);
break;
} else {
xml("_ error.unsupported.xml.missingtag", "/base", "base-metadata");
throw new StopException(null);
}
case ON_METADATA:
metadataHandler.processStartElement(qName, null);
break;
}
}
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
if (metadataHandler != null) {
boolean done = metadataHandler.processEndElement(qName);
if (done) {
throw new StopException(metadataHandler.getBaseURI());
}
}
eventType = xpp.next();
} while (eventType != XmlPullParser.END_DOCUMENT);
return null;
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
if (metadataHandler != null) {
metadataHandler.processText(ch, start, length);
}
}
}
private void xml(String key, Object... values) {
DomMessages.invalid(messageHandler, key, values);
private static class StopException extends RuntimeException {
private final BaseURI baseURI;
private StopException(BaseURI baseURI) {
this.baseURI = baseURI;
}
private BaseURI getBaseURI() {
return baseURI;
}
}
}
......@@ -11,16 +11,17 @@ package net.scrutari.xml;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import net.mapeadores.util.exceptions.NestedLibraryException;
import net.mapeadores.util.logging.MessageHandler;
import net.mapeadores.util.xml.DomMessages;
import net.scrutari.data.BaseData;
import net.scrutari.data.DataValidator;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
......@@ -29,95 +30,136 @@ import org.xmlpull.v1.XmlPullParserFactory;
*/
public class BaseXmlEngine {
private final XmlPullParserFactory factory;
private final SAXParserFactory factory;
public BaseXmlEngine() {
this.factory = SAXParserFactory.newInstance();
}
public void run(BaseData.Builder baseDataBuilder, Parameters parameters, InputStream inputStream, boolean includeBaseMetadata) throws SAXException, IOException {
SAXParser saxParser;
try {
this.factory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null);
} catch (XmlPullParserException xppe) {
throw new NestedLibraryException(xppe);
saxParser = factory.newSAXParser();
} catch (ParserConfigurationException pce) {
throw new NestedLibraryException(pce);
}
try {
saxParser.parse(inputStream, new BaseSaxHandler(baseDataBuilder, parameters, includeBaseMetadata));
} catch (StopException se) {
}
}
public void runMetadataRoot(BaseData.Builder baseDataBuilder, InputStream inputStream, MessageHandler messageHandler, DataValidator dataValidator) throws SAXException, IOException {
SAXParser saxParser;
try {
saxParser = factory.newSAXParser();
} catch (ParserConfigurationException pce) {
throw new NestedLibraryException(pce);
}
try {
saxParser.parse(inputStream, new MetadataSaxHandler(baseDataBuilder, messageHandler, dataValidator));
} catch (StopException se) {
}
}
public void run(BaseData.Builder baseDataBuilder, Parameters parameters, InputStream inputStream, boolean includeBaseMetadata) throws XmlPullParserException, IOException {
XmlPullParser xpp = factory.newPullParser();
xpp.setInput(inputStream, null);
RootHandler rootHandler = null;
int eventType = xpp.getEventType();
do {
if (eventType == XmlPullParser.START_TAG) {
String tagName = xpp.getName();
if (!IndexationXmlEngine.isElement(tagName)) {
if (rootHandler == null) {
if (tagName.equals("base")) {
rootHandler = new RootHandler(baseDataBuilder, parameters, includeBaseMetadata);
} else {
DomMessages.invalid(parameters.getMessageHandler(), "_ error.wrong.xml.root", tagName, "base");
break;
}
private class BaseSaxHandler extends DefaultHandler {
private final BaseData.Builder baseDataBuilder;
private final Parameters parameters;
private final boolean includeBaseMetadata;
private RootHandler rootHandler = null;
private BaseSaxHandler(BaseData.Builder baseDataBuilder, Parameters parameters, boolean includeBaseMetadata) {
this.baseDataBuilder = baseDataBuilder;
this.parameters = parameters;
this.includeBaseMetadata = includeBaseMetadata;
}
@Override
public void startElement(String uri, String localName, String tagName, Attributes attributes) throws SAXException {
if (!IndexationXmlEngine.isElement(tagName)) {
if (rootHandler == null) {
if (tagName.equals("base")) {
rootHandler = new RootHandler(baseDataBuilder, parameters, includeBaseMetadata);
} else {
Map<String, String> map = null;
int count = xpp.getAttributeCount();
if (count > 0) {
map = new HashMap<String, String>();
for (int i = 0; i < count; i++) {
map.put(xpp.getAttributeName(i), xpp.getAttributeValue(i));
}
}
rootHandler.processStartElement(xpp.getName(), map);
DomMessages.invalid(parameters.getMessageHandler(), "_ error.wrong.xml.root", tagName, "base");
throw new StopException();
}
} else {
rootHandler.processStartElement(tagName, attributes);
}
} else if (eventType == XmlPullParser.END_TAG) {
String tagName = xpp.getName();
if (!IndexationXmlEngine.isElement(tagName)) {
rootHandler.processEndElement(tagName);
}
} else if (eventType == XmlPullParser.TEXT) {
if (rootHandler != null) {
rootHandler.processText(xpp.getText());
}
}
eventType = xpp.next();
} while (eventType != XmlPullParser.END_DOCUMENT);
}
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
if (!IndexationXmlEngine.isElement(qName)) {
rootHandler.processEndElement(qName);
}
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
if (rootHandler != null) {
rootHandler.processText(ch, start, length);
}
}
}
public void runMetadataRoot(BaseData.Builder baseDataBuilder, InputStream inputStream, MessageHandler messageHandler, DataValidator dataValidator) throws XmlPullParserException, IOException {
XmlPullParser xpp = factory.newPullParser();
xpp.setInput(inputStream, null);
BaseMetadataHandler metadataRootHandler = null;
int eventType = xpp.getEventType();
do {
if (eventType == XmlPullParser.START_TAG) {
String tagName = xpp.getName();
if (metadataRootHandler == null) {
if (tagName.equals("base-metadata")) {
metadataRootHandler = new BaseMetadataHandler(baseDataBuilder, messageHandler, dataValidator, "/base-metadata");
} else {
DomMessages.invalid(messageHandler, "_ error.wrong.xml.root", tagName, "base-metadata");
break;
}
private class MetadataSaxHandler extends DefaultHandler {
private final BaseData.Builder baseDataBuilder;
private final MessageHandler messageHandler;
private final DataValidator dataValidator;
private BaseMetadataHandler metadataRootHandler = null;
private MetadataSaxHandler(BaseData.Builder baseDataBuilder, MessageHandler messageHandler, DataValidator dataValidator) {
this.baseDataBuilder = baseDataBuilder;
this.messageHandler = messageHandler;
this.dataValidator = dataValidator;
}
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
if (metadataRootHandler == null) {
if (qName.equals("base-metadata")) {
metadataRootHandler = new BaseMetadataHandler(baseDataBuilder, messageHandler, dataValidator, "/base-metadata");
} else {
Map<String, String> map = null;
int count = xpp.getAttributeCount();
if (count > 0) {
map = new HashMap<String, String>();
for (int i = 0; i < count; i++) {
map.put(xpp.getAttributeName(i), xpp.getAttributeValue(i));
}
}
metadataRootHandler.processStartElement(xpp.getName(), map);
}
} else if (eventType == XmlPullParser.END_TAG) {
String tagName = xpp.getName();
metadataRootHandler.processEndElement(tagName);
} else if (eventType == XmlPullParser.TEXT) {
if (metadataRootHandler != null) {
metadataRootHandler.processText(xpp.getText());
DomMessages.invalid(messageHandler, "_ error.wrong.xml.root", qName, "base-metadata");
throw new StopException();
}
} else {
metadataRootHandler.processStartElement(qName, attributes);
}
eventType = xpp.next();
} while (eventType != XmlPullParser.END_DOCUMENT);
}
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
metadataRootHandler.processEndElement(qName);
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
if (metadataRootHandler != null) {
metadataRootHandler.processText(ch, start, length);
}
}
}
private static class StopException extends RuntimeException {
private StopException() {
}
}
}
......@@ -12,7 +12,6 @@ package net.scrutari.xml;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.text.ParseException;
import java.util.Map;
import net.mapeadores.util.attr.AttributeKey;
import net.mapeadores.util.localisation.Lang;
import net.mapeadores.util.logging.ErrorMessageException;
......@@ -31,6 +30,7 @@ import net.scrutari.datauri.CorpusURI;
import net.scrutari.datauri.FicheURI;
import net.scrutari.db.api.DataCoder;
import net.scrutari.db.api.caches.DataCacheWriter;
import org.xml.sax.Attributes;
/**
......@@ -79,7 +79,7 @@ class CorpusHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
if (!metadataDone) {
if (tagname.equals("corpus-metadata")) {
metadataDone = true;
......@@ -90,7 +90,7 @@ class CorpusHandler extends DefaultElementHandler {
}
} else {
if (tagname.equals("fiche")) {
String ficheId = getAttributeString(attributeMap, "fiche-id");
String ficheId = getAttributeString(attributes, "fiche-id");
if (ficheId == null) {
SctXmlUtils.xml(messageHandler, "_ error.empty.xml.attribute", corpusxpath + "/fiche", "fiche-id");
return null;
......@@ -147,7 +147,7 @@ class CorpusHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
String xpath = corpusxpath + "/corpus-metadata/" + tagname;
switch (tagname) {
case "intitule-corpus":
......@@ -162,7 +162,7 @@ class CorpusHandler extends DefaultElementHandler {
case "corpus-icon":
return null;
case "attr":
AttributeKey attributeKey = SctXmlUtils.parseAttributeKey(attributeMap, messageHandler, xpath);
AttributeKey attributeKey = SctXmlUtils.parseAttributeKey(attributes, messageHandler, xpath);
if (attributeKey != null) {
return new AttrHandler(attributeKey, messageHandler, SctXmlUtils.toXpath(xpath, attributeKey), dataValidator.getFormatChecker(attributeKey));
} else {
......@@ -225,7 +225,7 @@ class CorpusHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
switch (tagname) {
case "titre":
return new SimpleElementHandler(TITRE);
......@@ -244,7 +244,7 @@ class CorpusHandler extends DefaultElementHandler {
case "geoloc":
return new GeolocHandler();
case "attr":
AttributeKey attributeKey = SctXmlUtils.parseAttributeKey(attributeMap, messageHandler, ficheXpath + "/attr");
AttributeKey attributeKey = SctXmlUtils.parseAttributeKey(attributes, messageHandler, ficheXpath + "/attr");
if (attributeKey != null) {
return new AttrHandler(attributeKey, messageHandler, SctXmlUtils.toXpath(ficheXpath + "/attr", attributeKey), dataValidator.getFormatChecker(attributeKey));
} else {
......@@ -354,10 +354,10 @@ class CorpusHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
if (tagname.equals("lib")) {
try {
return new LabelElementHandler(attributeMap, xpath + "/lib");
return new LabelElementHandler(attributes, xpath + "/lib");
} catch (ErrorMessageException eme) {
SctXmlUtils.lang(messageHandler, eme.getErrorMessage());
return null;
......@@ -383,7 +383,7 @@ class CorpusHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
switch (tagname) {
case "lat":
return new SimpleElementHandler(LATITUDE);
......
......@@ -9,7 +9,6 @@
package net.scrutari.xml;
import java.util.Map;
import net.mapeadores.util.logging.MessageHandler;
import net.mapeadores.util.xml.handlers.DefaultElementHandler;
import net.mapeadores.util.xml.handlers.ElementHandler;
......@@ -19,6 +18,7 @@ import net.scrutari.data.DataValidator;
import net.scrutari.data.ThesaurusData;
import net.scrutari.datauri.CorpusURI;
import net.scrutari.datauri.ThesaurusURI;
import org.xml.sax.Attributes;
/**
......@@ -42,7 +42,7 @@ class RootHandler extends DefaultElementHandler {
}
@Override
public ElementHandler startSubElement(String tagname, Map<String, String> attributeMap) {
public ElementHandler startSubElement(String tagname, Attributes attributes) {
switch (tagname) {
case "base-metadata":
if (buildBaseMetadata) {
......@@ -51,7 +51,7 @@ class RootHandler extends DefaultElementHandler {
return null;
}
case "corpus":
String corpusName = getAttributeString(attributeMap, "corpus-name");
String corpusName = getAttributeString(attributes, "corpus-name");
if (corpusName == null) {
SctXmlUtils.xml(messageHandler, "_ error.empty.xml.attribute", "/base/corpus", "corpus-name");
return null;
......@@ -67,7 +67,7 @@ class RootHandler extends DefaultElementHandler {
return null;
}
case "thesaurus":
String thesaurusName = getAttributeString(attributeMap, "thesaurus-name");
String thesaurusName = getAttributeString(attributes, "thesaurus-name");
if (thesaurusName == null) {
SctXmlUtils.xml(messageHandler, "_ error.empty.xml.attribute", "/base/thesaurus", "thesaurus-name");
return null;
......
......@@ -14,7 +14,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.ParseException;
import java.util.Map;
import net.mapeadores.util.attr.AttributeKey;
import net.mapeadores.util.localisation.LocalisationUtils;
import net.mapeadores.util.localisation.Message;
......@@ -24,6 +23,7 @@ import net.mapeadores.util.xml.DomMessages;
import net.mapeadores.util.xml.handlers.LabelElementHandler;
import net.scrutari.data.SctSpace;
import net.mapeadores.util.xml.handlers.ElementHandler;
import org.xml.sax.Attributes;
/**
......@@ -61,8 +61,8 @@ public final class SctXmlUtils {
return uri;
}
public static AttributeKey parseAttributeKey(Map<String, String> attributeMap, MessageHandler messageHandler, String xpath) {
String localKey = attributeMap.get("key");
public static AttributeKey parseAttributeKey(Attributes attributes, MessageHandler messageHandler, String xpath) {
String localKey = attributes.getValue("key");
if (localKey != null) {
localKey = localKey.trim();
}
......@@ -70,7 +70,7 @@ public final class SctXmlUtils {
xml(messageHandler, "_ error.empty.xml.attribute", xpath, "key");
return null;
}
String nameSpace = attributeMap.get("ns");
String nameSpace = attributes.getValue("ns");
if (nameSpace != null) {
nameSpace = nameSpace.trim();
}
......
......@@ -9,7 +9,6 @@
package net.scrutari.xml;
import java.util.Map;
import net.mapeadores.util.attr.AttributeKey;
import net.mapeadores.util.logging.ErrorMessageException;
import net.mapeadores.util.logging.MessageHandler;
......@@ -24,6 +23,7 @@ import net.scrutari.datauri.MotcleURI;
import net.scrutari.datauri.ThesaurusURI;
import net.scrutari.db.api.DataCoder;
import net.scrutari.db.api.caches.DataCacheWriter;
import org.xml.sax.Attributes;