Package wyfs.lang.Path

Examples of wyfs.lang.Path.Entry


      Path.Item item = contents[idx];
      do {
        if(item instanceof Entry && eid.size() == 1) {
          // In this case, we're looking for and have found an exact
          // item.
          Entry entry = (Entry) item;
          if (entry.contentType() == ct) {
            return entry;
          }
        } else if (item instanceof Path.Folder && eid.size() > 1) {
          // In this case, the ID is indicates the item is not
          // contained in this folder.
View Full Code Here


    // given Java's generic type system.

    for(int i=0;i!=nentries;++i) {
      Path.Item item = contents[i];
      if(item instanceof Entry) {
        Entry entry = (Entry) item;
        entries.add(entry);
      } else if (item instanceof Path.Folder) {
        Path.Folder folder = (Path.Folder) item;
        entries.addAll(folder.getAll());
      }
View Full Code Here

    // potentially largel subtree.

    for(int i=0;i!=nentries;++i) {
      Path.Item item = contents[i];
      if(item instanceof Entry) {
        Entry entry = (Entry) item;
        if(filter.matches(entry.id(),entry.contentType())) {
          entries.add(entry);
        }
      } else if (item instanceof Path.Folder
          && filter.matchesSubpath(item.id())) {
        Path.Folder folder = (Path.Folder) item;
View Full Code Here

    // potentially largel subtree.

    for(int i=0;i!=nentries;++i) {
      Path.Item item = contents[i];
      if (item instanceof Entry) {
        Entry entry = (Entry) item;
        if (filter.matches(entry.id(), entry.contentType())) {
          entries.add(entry.id());
        }
      } else if (item instanceof Path.Folder
          && filter.matchesSubpath(item.id())) {
        Path.Folder folder = (Path.Folder) item;
        folder.getAll(filter, entries);
View Full Code Here

          } else {
            int idx = filename.lastIndexOf('.');
            if (idx > 0) {
              String name = filename.substring(0, idx);
              Path.ID oid = id.append(name);
              Entry e = new Entry(oid, file);
              contentTypes.associate(e);
              items[count++] = e;
            }
          }
        }
View Full Code Here

          String physID = nid.toString().replace('/',
              File.separatorChar);
          physID = physID + "." + contentTypes.suffix(ct);
          File nfile = new File(dir.getAbsolutePath()
              + File.separatorChar + physID);
          e = new Entry(nid, nfile);
          e.associate(ct, null);
          super.insert(e);
        }
        return e;
      } else {
View Full Code Here

TOP

Related Classes of wyfs.lang.Path.Entry

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.