Package com.dbxml.db.core.data

Examples of com.dbxml.db.core.data.Key


      try {
         CollectionClientImpl col = (CollectionClientImpl)client.getCollection(colName);
         if ( col == null )
            throw new CompilationException("Template Collection '" + colName + "' not found");

         RecordMetaData meta = col.getInternalCollection().getRecordMetaData(tx, new Key(docName));
         long lastModified = System.currentTimeMillis();
         if ( meta != null ) {
            Long lm = (Long)meta.getValue(RecordMetaData.MODIFIED);
            if ( lm != null )
               lastModified = lm.longValue();
View Full Code Here


      final IndexPattern pattern = query.getPattern();

      try {
         query(tx, query, new BTreeCallback() {
            public void indexInfo(Value value, Value extra) {
               results.add(new IndexMatch(new Key(value), pattern));
            }
         });
      }
      catch ( DBException d ) {
         throw d;
View Full Code Here

   }

   private IndexMatch getIndexMatch(Value v) {
      byte[] b = v.getData();
      int l = b.length - 13;
      Key key = new Key(b, 0, b.length - 13);

      int pos = ByteArray.readInt(b, l+1);
      int elemID = ByteArray.readInt(b, l+5);
      int attrID = ByteArray.readInt(b, l+9);
View Full Code Here

               // Null is ok
            }

            if ( doc != null ) {
               try {
                  String path = context.getCanonicalDocumentName(new Key(docName));
                  String systemID = XSLTQueryResolver.URL_PREFIX + path;
                  src = new DOMSource(doc, systemID);
               }
               catch ( Exception e ) {
                  // This shouldn't happen
View Full Code Here

   }

   private IndexMatch getIndexMatch(Value v) {
      byte[] b = v.getData();
      int l = b.length - 13;
      Key key = new Key(b, 0, b.length - 13);

      int pos = ByteArray.readInt(b, l+1);
      int elemID = ByteArray.readInt(b, l+5);
      int attrID = ByteArray.readInt(b, l+9);
View Full Code Here

   public Map getInformation() throws DBException {
      Map result = new HashMap(4);
      result.put(NAME, docName);
      result.put(COL_NAME, col.getCanonicalName());
      result.put(CANONICAL_NAME, col.getCanonicalDocumentName(new Key(docName)));
      result.put(CONTENT_TYPE, new Integer(type));
      return result;
   }
View Full Code Here

   public byte[] get() throws HTTPException, DBException {
      Transaction tx = new Transaction();

      try {
         Key key = new Key(docName);

         // Let's see if we can interact with Labrador's HTTP Server for REST calls
         BrokerContext context = Broker.getInstance().getBrokerContext();
         Handler handler = context.getHandler();
         Endpoint endpoint = context.getRequestEndpoint();
View Full Code Here

            throw new FilerException(FaultCodes.GEN_CRITICAL_ERROR, "Error generating RecordSet", e);
         }
      }

      public synchronized void indexInfo(Value value, Value extra) {
         keys.add(new Key(value));
      }
View Full Code Here

      }

      SortedSet set = new TreeSet();
      boolean done = false;
      List highs = new ArrayList(4);
      Key highest = null;
      while ( !done ) {
         boolean eq = true;

         for ( int i = 0; i < ptrs.length; i++ ) {
            Key comp = keySets[i][ptrs[i]];
            if ( highest == null ) {
               highest = comp;
               highs.add(new Integer(i));
            }
            else {
View Full Code Here

    * @param tx The controlling Transaction
    * @return a ContentHandler for feeding SAX events
    * @throws DBException If a Database Exception occurs
    */
   public ContentHandler insertDocument(Transaction tx) throws DBException {
      Key key = col.createNewOID();
      return putDocument(tx, key);
   }
View Full Code Here

TOP

Related Classes of com.dbxml.db.core.data.Key

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.