Package com.dbxml.xml.dtsm

Examples of com.dbxml.xml.dtsm.DocumentTable


    * @throws DBException If a Database Exception occurs
    */
   public XMLSerializable getObject(Transaction tx, Object key) throws DBException {
      Document doc = null;
      try {
         DocumentTable dt = col.getDocument(tx, key);
         if ( dt != null )
            doc = DTSMHelper.tableToDocument(dt);
      }
      catch ( DTSMException e ) {
         throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Error retrieving object '" + key + "'", e);
View Full Code Here


            }
            root.appendChild(doc.createTextNode("\n"));
         }
         while ( rs.next() );

         DocumentTable dt = DTSMHelper.documentToTable(doc, st);
         CompressedTable ct = DTSMHelper.compressTable(dt);
         return new Record(key, new Value(ct.getData()));
      }
      catch ( Exception e ) {
         e.printStackTrace(System.err);
View Full Code Here

         DocBuilder builder = new DocBuilder(rs);
         Document doc = builder.getDocument();

         if ( doc != null ) {
            DocumentTable dt = DTSMHelper.documentToTable(doc, st);
            CompressedTable ct = DTSMHelper.compressTable(dt);
            return new Record(key, new Value(ct.getData()));
         }
      }
      catch ( Exception e ) {
View Full Code Here

      super(col);
   }

   private void putObject(Transaction tx, Object key, Element obj) throws DBException {
      Node node = new Variant(obj).getNode();
      DocumentTable dt;

      try {
         dt = DTSMHelper.nodeToTable(node, col.getSymbols());
      }
      catch ( DTSMException e ) {
View Full Code Here

    * @throws DBException If a Database Exception occurs
    */
   public Element getObject(Transaction tx, Object key) throws DBException {
      Document doc = null;
      try {
         DocumentTable dt = col.getDocument(tx, key);
         if ( dt != null )
            doc = DTSMHelper.tableToDocument(dt);
      }
      catch ( DTSMException e ) {
         throw new DBException(FaultCodes.COL_CANNOT_RETRIEVE, "Error retrieving object '" + key + "'", e);
View Full Code Here

      super(col);
   }

   private void putDocument(Transaction tx, Object key, Document doc) throws DBException {
      try {
         DocumentTable dt = DTSMHelper.nodeToTable(doc, col.getSymbols());
         col.setDocument(tx, key, dt);
      }
      catch ( DTSMException e ) {
         throw new DBException(FaultCodes.COL_CANNOT_STORE, "Error storing object '" + key + "'", e);
      }
View Full Code Here

    * @return a DOM Document
    * @throws DBException If a Database Exception occurs
    */
   public Document getDocument(Transaction tx, Object key) throws DBException {
      try {
         DocumentTable dt = col.getDocument(tx, key);
         if ( dt != null )
            return DTSMHelper.tableToDocument(dt);
         else
            return null;
      }
View Full Code Here

         ResultSet rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, sb.toString(), null);
         Map grpMap = new HashMap(); // of String to List of Element

         while ( rs.next() ) {
            try {
               DocumentTable dt = rs.getResult();
               Element elem = (Element)DTSMHelper.tableToNode(dt);
               NodeList nl = elem.getElementsByTagName(Constants.GROUP);
               for ( int i = 0; i < nl.getLength(); i++ ) {
                  Element e = (Element)nl.item(i);
                  String grpName = DOMUtils.getText(e);
View Full Code Here

TOP

Related Classes of com.dbxml.xml.dtsm.DocumentTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.