Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.FramedResource.lookup()


          ResourceReference rr = dir.lookup(index);
          if (rr != null) {
        try {
            FramedResource rindex =
          (FramedResource) rr.lock();
            return rindex.lookup(ls,lr);
        } catch (InvalidResourceException ex) {
        } finally {
            rr.unlock();
        }
          }
View Full Code Here


        try {
      FramedResource root = (FramedResource) rr_root.lock();
      LookupState ls = new LookupState(code);
      LookupResult lr = new LookupResult(rr_root);
      ResourceReference wrap = null;
      if (root.lookup(ls,lr))
          wrap = lr.getTarget();
      if (wrap != null) {
          try {
        if (wrap.lock() instanceof ServletWrapper) {
            wrappers.put(code,wrap);
View Full Code Here

  }
  try {
      lr.setTarget(vrroot);
      FramedResource resource = (FramedResource) vrroot.lock();
      boolean done =
        (resource != null ) ? resource.lookup(ls, lr) : false;
      if (! done) {
    lr.setTarget(null);
      }
      // because the vroot eats the lookup state components
      // we have to return true.
View Full Code Here

      // Do the lookup:
      ResourceReference r_target = null;
      try {
    LookupState  ls = new LookupState(urlpath);
    LookupResult lr = new LookupResult(rr_root);
    root.lookup(ls, lr);
    r_target = lr.getTarget();
      } catch (Exception ex) {
    r_target = null;
      }
      if (r_target == null)
View Full Code Here

    lr.setTarget(null);
    return true;
      } else if ( getCvsManager().status(name) != CVS.FILE_Q ) {
    FramedResource target = getResourceFor(name);
    lr.setTarget( target.getResourceReference() );
    target.lookup(ls, lr);
    return true;
      } else {
    lr.setTarget(null);
    return true;
      }
View Full Code Here

      }
      if (selected != null) {
    try {
        FramedResource resource =
      (FramedResource) selected.unsafeLock();
        resource.lookup(ls, lr);
    } catch (InvalidResourceException ex) {
        // the failure will be processed in perform
    } finally {
        selected.unlock();
    }
View Full Code Here

  ResourceReference local_root = getLocalRoot(rr_root, rr);
  try {
      FramedResource root = (FramedResource)local_root.lock();
      LookupState    ls   = new LookupState(path);
      LookupResult   lr   = new LookupResult(local_root);
      if (root.lookup(ls,lr)) {
    ResourceReference  target = lr.getTarget();
    if (target != null) {
        try {
      FramedResource res = (FramedResource)target.lock();
      if (res instanceof FileResource) {
View Full Code Here

  // Do the lookup:
  ResourceReference r_target = null;
  try {
      LookupState  ls = new LookupState(uripath);
      LookupResult lr = new LookupResult(rr_root);
      root.lookup(ls, lr);
      r_target = lr.getTarget();
  } catch (Exception ex) {
      r_target = null;
  }
  //then return its context
View Full Code Here

        name = st.nextToken();
        uri  = SERVLET_BASE_P+"/"+name;
        try {
      ls   = new LookupState(uri);
      lr   = new LookupResult(root.getResourceReference());
      root.lookup(ls, lr);
      ResourceReference rr = lr.getTarget();
      if (rr != null) {
          try {
        ServletWrapper wrapper =
            (ServletWrapper) rr.lock();
View Full Code Here

      FramedResource root = (FramedResource) rr.lock();
      try {
    LookupState  ls = new LookupState(SERVLET_BASE_P);
    LookupResult lr =
        new LookupResult(root.getResourceReference());
    root.lookup(ls, lr);
    return lr.getTarget();
      } catch (ProtocolException ex) {
    ex.printStackTrace();
    return null;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.