KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > jcr > core > ReferenceableNodeLocation


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.services.jcr.core;
7
8 import javax.jcr.PathNotFoundException;
9 import java.util.Set JavaDoc;
10 import java.util.HashSet JavaDoc;
11
12 /**
13  * Created by The eXo Platform SARL .
14  *
15  * @author <a HREF="mailto:geaz@users.sourceforge.net">Gennady Azarenkov</a>
16  * @version $Id: ReferenceableNodeLocation.java,v 1.2 2004/11/02 18:29:51 geaz Exp $
17  */

18
19 public class ReferenceableNodeLocation extends ItemLocation {
20
21   private String JavaDoc UUID;
22   private String JavaDoc realPath;
23   private Set JavaDoc referencedPaths = new HashSet JavaDoc();
24
25   public ReferenceableNodeLocation(String JavaDoc absPath, String JavaDoc UUID, String JavaDoc realPath) throws PathNotFoundException {
26 // this(absPath, UUID, new HashSet());
27
super(absPath);
28      this.UUID = UUID;
29      this.realPath = realPath;
30
31   }
32
33   public ReferenceableNodeLocation(String JavaDoc absPath, String JavaDoc UUID, String JavaDoc realPath, Set JavaDoc referencedPaths) throws PathNotFoundException {
34      super(absPath);
35      this.UUID = UUID;
36      this.realPath = realPath;
37      this.referencedPaths = referencedPaths;
38   }
39
40   public String JavaDoc getUUID() {
41     return UUID;
42   }
43
44   public String JavaDoc getRealPath() {
45     return realPath;
46   }
47
48   public void addReferencedPath(String JavaDoc path) {
49     referencedPaths.add(path);
50   }
51
52   public Set JavaDoc getReferencedPaths() {
53     return referencedPaths;
54   }
55
56   public String JavaDoc toString() {
57
58     return "RefereanceableNodeLocation "+UUID+" path:"+getPath()+" real path:"+realPath+" references:"+referencedPaths;
59   }
60
61 }
62
Popular Tags