Mercurial > hg > openmind
changeset 82:90f9a1c45b15
small change to xml format.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 10 Jul 2017 17:15:34 +0200 |
parents | 4845dff46ad9 |
children | 979604ccc6db |
files | src/main/java/org/mpi/openmind/repository/utils/OM4StreamWriter.java src/main/java/org/mpi/openmind/repository/utils/OM4XmlEventReader.java |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/org/mpi/openmind/repository/utils/OM4StreamWriter.java Fri Jun 16 16:08:06 2017 +0200 +++ b/src/main/java/org/mpi/openmind/repository/utils/OM4StreamWriter.java Mon Jul 10 17:15:34 2017 +0200 @@ -105,12 +105,12 @@ if (type.equals(Node.TYPE_ABOX)) { writer.writeStartElement(XMLUtil.OPENMIND_DATA); - writer.writeAttribute("version", "4.5"); + writer.writeAttribute("version", "4.6"); // get number of content Entities entitiesCount = ps.getEntityCount(null).intValue(); } else { writer.writeStartElement(XMLUtil.META_DATA); - writer.writeAttribute("version", "4.5"); + writer.writeAttribute("version", "4.6"); // get number of definition Entities entitiesCount = ps.getEntityCount(Node.TYPE_TBOX).intValue(); } @@ -128,7 +128,7 @@ * write entities */ writer.writeStartElement((type.equals(Node.TYPE_TBOX)) ? XMLUtil.DEFINITIONS : XMLUtil.ENTITIES); - writer.writeAttribute("number", Integer.toString(entitiesCount)); + writer.writeAttribute("count", Integer.toString(entitiesCount)); // iterate database by pages for (int currentPage = 0; currentPage <= numberOfPages; currentPage++) { int startRecord = currentPage * itemsPerPage; @@ -164,7 +164,7 @@ * write relations (from list) */ writer.writeStartElement(XMLUtil.RELATIONS); - writer.writeAttribute("number", Integer.toString(relList.size())); + writer.writeAttribute("count", Integer.toString(relList.size())); for (Relation rel : relList) { writeRelation(rel, writer, includeNorm, relStats); }
--- a/src/main/java/org/mpi/openmind/repository/utils/OM4XmlEventReader.java Fri Jun 16 16:08:06 2017 +0200 +++ b/src/main/java/org/mpi/openmind/repository/utils/OM4XmlEventReader.java Mon Jul 10 17:15:34 2017 +0200 @@ -140,7 +140,7 @@ private List<OmXmlEntity> processEntities(StartElement elem, XMLEventReader reader) throws XMLStreamException { logger.debug("loading entities..."); // get number attribute - Attribute numa = elem.getAttributeByName(new QName("number")); + Attribute numa = elem.getAttributeByName(new QName("count")); if (numa != null) { numEntities = Integer.parseInt(numa.getValue()); } @@ -237,7 +237,7 @@ private List<OmXmlRelation> processRelations(StartElement elem, XMLEventReader reader) throws XMLStreamException { logger.debug("loading relations..."); // get number attribute - Attribute numa = elem.getAttributeByName(new QName("number")); + Attribute numa = elem.getAttributeByName(new QName("count")); if (numa != null) { numRelations = Integer.parseInt(numa.getValue()); }