, File>
-{
- /**
- * Return true
if this {@link FileResource} exists and is actually a directory, otherwise return false;
- */
- public boolean isDirectory();
-
- /**
- * Returns true
if the underlying resource has been modified on the file system since it was initially
- * loaded.
- *
- * @return boolean true if resource is changed.
- */
- public boolean isStale();
-
- /**
- * Re-read the file-system meta-data for this resource (such as last modified time-stamp, and permissions.)
- */
- public void refresh();
-
- /**
- * Requests that the file or directory denoted by this resource be deleted when the virtual machine terminates.
- *
- * Once deletion has been requested, it is not possible to cancel the request. This method should therefore be used
- * with care.
- */
- public void deleteOnExit();
-
- /**
- * Create the file in the underlying resource system. Necessary directory paths will be created automatically.
- *
- * @deprecated See {@link #create()})
- */
- public boolean createNewFile();
-
- /**
- * Create a temporary {@link FileResource}
- */
- public T createTempResource();
-
- /**
- * Create a new single directory for this resource. This will not succeed if any parent directories needed for this
- * resource to exist are missing. You should consider using {@link #mkdirs()}
- */
- public boolean mkdir();
-
- /**
- * Create all directories required for this resource to exist.
- */
- public boolean mkdirs();
-
- /**
- * Rename this {@link Resource} to the given path.
- */
- public boolean renameTo(final String pathspec);
-
- /**
- * Rename this {@link Resource} to the given {@link FileResource}
- */
- public boolean renameTo(final FileResource> target);
-
- /**
- * Returns the size of the file denoted by this abstract pathname
- */
- public long getSize();
-
- /**
- * Returns if a file is writable
- */
- public boolean isWritable();
-
- /**
- * Returns if a file is readable
- */
- public boolean isReadable();
-
- /**
- * Returns if a file is executable
- */
- public boolean isExecutable();
-
- /**
- * A parent for a FileResource is always a DirectoryResource
- */
- @Override
- public DirectoryResource getParent();
-
- /**
- * Monitors this FileResource
- */
- ResourceMonitor monitor();
-
- /**
- * Monitors this FileResource using the given filter
- */
- ResourceMonitor monitor(ResourceFilter filter);
-
- /**
- * Get the last modified time-stamp of this resource.
- */
- public long getLastModified();
-
- /**
- * Set the last modified time-stamp of this resource.
- */
- public void setLastModified(long currentTimeMillis);
-}
\ No newline at end of file
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/PathResource.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/PathResource.java
index 60e259010f..010b106575 100644
--- a/resources/api/src/main/java/org/jboss/forge/addon/resource/PathResource.java
+++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/PathResource.java
@@ -14,11 +14,6 @@ public interface PathResource extends Resource,
CreatableResource,
WriteableResource
{
- /**
- * Return true if this {@link FileResource} exists and is actually a directory, otherwise return false;
- */
- public boolean isDirectory();
-
/**
* Returns true if the underlying resource has been modified on the file system since it was initially loaded.
*
@@ -31,17 +26,6 @@ public interface PathResource extends Resource,
*/
public void refresh();
- /**
- * Create a new single directory for this resource. This will not succeed if any parent directories needed for this
- * resource to exist are missing. You should consider using {@link #mkdirs()}
- */
- public boolean mkdir();
-
- /**
- * Create all directories required for this resource to exist.
- */
- public boolean mkdirs();
-
/**
* Requests that the file or directory denoted by this resource be deleted when the virtual machine terminates.
*
@@ -50,16 +34,6 @@ public interface PathResource extends Resource,
*/
public void deleteOnExit();
- /**
- * Create the file in the underlying resource system. Necessary directory paths will be created automatically.
- */
- public boolean createNewPath();
-
- /**
- * Create a temporary {@link PathResource}
- */
- public PathResource createTempResource();
-
/**
* Rename this {@link Resource} to the given path.
*/
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/Resource.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/Resource.java
index 96c84e0ae2..ece6e35774 100644
--- a/resources/api/src/main/java/org/jboss/forge/addon/resource/Resource.java
+++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/Resource.java
@@ -73,15 +73,6 @@ public interface Resource extends Faceted
*/
Resource> getParent();
- /**
- * Create a new resource instance for the target resource reference of the type that this current resource is.
- *
- * @deprecated use {@link ResourceFactory#create(Class, Object)}
- * @param file The target reference to create the resource instance from.
- * @return A new {@link Resource} instance.
- */
- Resource createFrom(T file);
-
/**
* Return a list of child resources of the current resource. (Never null.)
*/
@@ -122,6 +113,16 @@ public interface Resource extends Faceted
*/
boolean exists();
+ /**
+ * Returns true
if this {@link Resource} is a leaf
+ */
+ boolean isLeaf();
+
+ /**
+ * Returns true
if this {@link Resource} is a container
+ */
+ boolean isContainer();
+
/**
* Ask this {@link Resource} if it is actually a resource of the given type; if it is, return a new reference to the
* resource as the given type, otherwise return null
.
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/ResourceOperations.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/ResourceOperations.java
index 61ef0a77db..52e09bc4a8 100644
--- a/resources/api/src/main/java/org/jboss/forge/addon/resource/ResourceOperations.java
+++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/ResourceOperations.java
@@ -28,11 +28,9 @@ public interface ResourceOperations
void deleteOnExit(T resource);
- boolean create(T resource) throws ResourceException;
+ boolean createLeaf(T resource) throws ResourceException;
- boolean mkdir(T resource) throws ResourceException;
-
- boolean mkdirs(T resource) throws ResourceException;
+ boolean createContainer(T resource) throws ResourceException;
OutputStream createOutputStream(T resource) throws ResourceException;
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/VirtualResource.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/VirtualResource.java
index 9272fc9291..fef914b282 100644
--- a/resources/api/src/main/java/org/jboss/forge/addon/resource/VirtualResource.java
+++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/VirtualResource.java
@@ -9,19 +9,27 @@
*/
public abstract class VirtualResource extends AbstractResource
{
- protected VirtualResource(ResourceFactory factory, final Resource> parent)
+ private Resource> underlyingResource;
+
+ protected VirtualResource(ResourceFactory factory, final Resource> underlyingResource)
+ {
+ super(factory, null);
+ this.underlyingResource = underlyingResource;
+ }
+
+ public Resource> getUnderlyingResource()
{
- super(factory, parent);
+ return underlyingResource;
}
@Override
- public Resource> getChild(final String name)
+ public Resource> getParent()
{
- throw new RuntimeException("not implemented");
+ return underlyingResource.getParent();
}
@Override
- public Resource createFrom(T resource)
+ public Resource> getChild(final String name)
{
throw new RuntimeException("not implemented");
}
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourcePathResolver.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourcePathResolver.java
index 89219f4a61..c460a26637 100644
--- a/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourcePathResolver.java
+++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourcePathResolver.java
@@ -16,7 +16,7 @@
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import org.jboss.forge.addon.resource.DirectoryResource;
+import org.jboss.forge.addon.resource.PathResource;
import org.jboss.forge.addon.resource.Resource;
import org.jboss.forge.addon.resource.ResourceFactory;
import org.jboss.forge.addon.resource.URLResource;
@@ -93,19 +93,19 @@ else if (path.startsWith("~"))
if (path.length() == 1)
{
- return singleResult(factory.create(DirectoryResource.class, homeDir));
+ return singleResult(factory.create(PathResource.class, homeDir.toPath()));
}
else
{
cursor++;
- r = factory.create(DirectoryResource.class, homeDir);
+ r = factory.create(PathResource.class, homeDir.toPath());
}
}
// for windows, support drive letter prefixes here.
else if (isWindows && path.matches("^[a-zA-Z]{1,1}:(/|\\\\).*"))
{
int idx = path.lastIndexOf(slashChar) + 1;
- r = factory.create(DirectoryResource.class, new File(path.substring(0, idx)).getAbsoluteFile());
+ r = factory.create(PathResource.class, new File(path.substring(0, idx)).getAbsoluteFile().toPath());
cursor = idx;
}
// Is an URL ?
@@ -264,7 +264,7 @@ private static List> match(String[] matchLevels,
if (matchPattern.matcher(res.getName()).matches())
{
// if ((nestStart < matchLevels.length) && res.isFlagSet(ResourceFlag.Node))
- if ((nestStart < matchLevels.length) && res instanceof DirectoryResource)
+ if ((nestStart < matchLevels.length) && res instanceof PathResource)
{
return match(matchLevels, nestStart + 1, res, candidates);
}
@@ -280,7 +280,7 @@ private static List> match(String[] matchLevels,
* bail.
*/
// if (!res.isFlagSet(ResourceFlag.Node) || (nestStart == matchLevels.length))
- if (!(res instanceof DirectoryResource) || (nestStart == matchLevels.length))
+ if (!(res instanceof PathResource) || (nestStart == matchLevels.length))
{
return candidates;
}
diff --git a/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourceUtil.java b/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourceUtil.java
index dfc88f29f6..fc54b1902a 100644
--- a/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourceUtil.java
+++ b/resources/api/src/main/java/org/jboss/forge/addon/resource/util/ResourceUtil.java
@@ -16,7 +16,7 @@
import java.util.Collection;
import java.util.List;
-import org.jboss.forge.addon.resource.DirectoryResource;
+import org.jboss.forge.addon.resource.PathResource;
import org.jboss.forge.addon.resource.Resource;
import org.jboss.forge.addon.resource.ResourceFilter;
import org.jboss.forge.furnace.util.Assert;
@@ -93,14 +93,14 @@ public static File getContextFile(Resource> r)
return null;
}
- public static DirectoryResource getContextDirectory(final Resource> r)
+ public static PathResource getContextDirectory(final Resource> r)
{
Resource> temp = r;
do
{
- if (temp instanceof DirectoryResource)
+ if (temp instanceof PathResource)
{
- return (DirectoryResource) temp;
+ return (PathResource) temp;
}
}
while ((temp != null) && ((temp = temp.getParent()) != null));
diff --git a/resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java b/resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java
deleted file mode 100644
index 37e5409608..0000000000
--- a/resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright 2012 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Eclipse Public License version 1.0, available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.jboss.forge.addon.resource;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.forge.furnace.util.OperatingSystemUtils;
-
-/**
- * A standard, build-in, resource for representing directories on the file-system.
- *
- * @author Lincoln Baxter, III
- */
-public class DirectoryResourceImpl extends AbstractFileResource implements DirectoryResource
-{
- private volatile List> listCache;
-
- public DirectoryResourceImpl(final ResourceFactory factory, final File file)
- {
- super(factory, file);
-
- isStale();
- }
-
- @Override
- public boolean create()
- {
- return mkdirs();
- }
-
- @Override
- protected List> doListResources()
- {
- if (isStale())
- {
- listCache = null;
- }
-
- if (listCache == null)
- {
- refresh();
- listCache = new LinkedList<>();
-
- File[] files = getFileOperations().listChildren(getUnderlyingResourceObject());
- if (files != null)
- {
- for (File f : files)
- {
- listCache.add(getResourceFactory().create(f));
- }
- }
- }
-
- return listCache;
- }
-
- @Override
- public Resource> getChild(final String name)
- {
- return getResourceFactory().create(new File(getUnderlyingResourceObject().getAbsolutePath(), name));
- }
-
- @Override
- public DirectoryResource getChildDirectory(final String name) throws ResourceException
- {
- Resource> result = getChild(name);
-
- if (!(result instanceof DirectoryResource))
- {
- if (result.exists())
- {
- throw new ResourceException("The resource [" + result.getFullyQualifiedName()
- + "] is not a DirectoryResource");
- }
- else
- {
- result = getResourceFactory().create(DirectoryResource.class,
- new File(getUnderlyingResourceObject().getAbsoluteFile(), name));
- }
- }
-
- return (DirectoryResource) result;
- }
-
- @Override
- public DirectoryResource getOrCreateChildDirectory(String name)
- {
- DirectoryResource child = getChildDirectory(name);
- if (!child.exists())
- {
- child.mkdir();
- }
- return child;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public > T getChildOfType(final Class type, final String name) throws ResourceException
- {
- T result;
- Resource> child = getChild(name);
- if (type.isAssignableFrom(child.getClass()))
- {
- result = (T) child;
- }
- else if (child.exists())
- {
- throw new ResourceException("Requested resource [" + name + "] was not of type [" + type.getName()
- + "], but was instead [" + child.getClass().getName() + "]");
- }
- else
- {
- E underlyingResource = (E) child.getUnderlyingResourceObject();
- result = getResourceFactory().create(type, underlyingResource);
- }
- return result;
- }
-
- @Override
- public DirectoryResource createTempResource()
- {
- try
- {
- File tempFile = File.createTempFile("forgetemp", "");
- tempFile.delete();
- return createFrom(tempFile);
- }
- catch (IOException e)
- {
- throw new ResourceException("Error while creating temporary directory", e);
- }
- }
-
- @Override
- public DirectoryResource createFrom(final File file)
- {
- if (getFileOperations().exists(file) && !getFileOperations().existsAndIsDirectory(file))
- {
- throw new ResourceException("File reference is not a directory: " + file.getAbsolutePath());
- }
- else if (!getFileOperations().exists(file))
- {
- getFileOperations().mkdirs(file);
- }
-
- return getResourceFactory().create(DirectoryResource.class, file);
- }
-
- @Override
- public synchronized DirectoryResource getParent()
- {
- if (super.getParent() == null)
- {
- File parentFile = getUnderlyingResourceObject().getParentFile();
- if (parentFile == null)
- {
- return null;
- }
-
- super.setParent(createFrom(parentFile));
- }
- return super.getParent();
- }
-
- @Override
- public String getName()
- {
- String fileName = getUnderlyingResourceObject().getName();
- // Windows: drive letter is needed. If filename is empty, we are on a root folder
- return (OperatingSystemUtils.isWindows() && fileName.length() == 0) ? getUnderlyingResourceObject().getPath()
- : fileName;
- }
-
- @Override
- public boolean equals(final Object obj)
- {
- return (obj instanceof DirectoryResourceImpl)
- && ((DirectoryResourceImpl) obj).getUnderlyingResourceObject().equals(getUnderlyingResourceObject());
- }
-
- @Override
- public long getSize()
- {
- throw new UnsupportedOperationException("getSize not supported for DirectoryResource objects");
- }
-
- @Override
- public DirectoryResource setContents(char[] data)
- {
- throw new UnsupportedOperationException("setContents(char[]) is not supported on DirectoryResource objects");
- }
-
- @Override
- public DirectoryResource setContents(InputStream data)
- {
- throw new UnsupportedOperationException("setContents(InputStream) is not supported on DirectoryResource objects");
- }
-
- @Override
- public DirectoryResource setContents(String data)
- {
- throw new UnsupportedOperationException("setContents(String) is not supported on DirectoryResource objects");
- }
-
- @Override
- public String getContents()
- {
- throw new UnsupportedOperationException("getContents() is not supported on DirectoryResource objects");
- }
-
- @Override
- public DirectoryResource setContents(char[] data, Charset charset)
- {
- throw new UnsupportedOperationException(
- "setContents(char[], Charset) is not supported on DirectoryResource objects");
- }
-
- @Override
- public DirectoryResource setContents(String data, Charset charset)
- {
- throw new UnsupportedOperationException(
- "setContents(String, Charset) is not supported on DirectoryResource objects");
- }
-
- @Override
- public String getContents(Charset charset)
- {
- throw new UnsupportedOperationException(
- "getContents(Charset) is not supported on DirectoryResource objects");
- }
-
- @Override
- public OutputStream getResourceOutputStream()
- {
- throw new UnsupportedOperationException(
- "getResourceOutputStream() is not supported on DirectoryResource objects");
- }
-}
\ No newline at end of file
diff --git a/resources/impl/src/main/java/org/jboss/forge/addon/resource/FileResourceGenerator.java b/resources/impl/src/main/java/org/jboss/forge/addon/resource/FileResourceGenerator.java
deleted file mode 100644
index f81930f12a..0000000000
--- a/resources/impl/src/main/java/org/jboss/forge/addon/resource/FileResourceGenerator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.jboss.forge.addon.resource;
-
-import java.io.File;
-
-public class FileResourceGenerator implements ResourceGenerator, File>
-{
- @Override
- public boolean handles(Class> type, Object resource)
- {
- return (resource instanceof File);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public > T getResource(ResourceFactory factory, Class> type, File resource)
- {
- ResourceOperations fileOperations = factory.getResourceOperations(File.class);
- if ((DirectoryResource.class.isAssignableFrom(type) && (!fileOperations.exists(resource)))
- || (fileOperations.existsAndIsDirectory(resource)))
- return (T) new DirectoryResourceImpl(factory, resource);
- return (T) new FileResourceImpl(factory, resource);
- }
-
- @Override
- public > Class> getResourceType(ResourceFactory factory, Class> type,
- File resource)
- {
- ResourceOperations fileOperations = factory.getResourceOperations(File.class);
- if ((DirectoryResource.class.isAssignableFrom(type) && (!fileOperations.exists(resource)))
- || (fileOperations.existsAndIsDirectory(resource)))
- return DirectoryResource.class;
- return FileResource.class;
- }
-}
diff --git a/resources/impl/src/main/java/org/jboss/forge/addon/resource/FileResourceImpl.java b/resources/impl/src/main/java/org/jboss/forge/addon/resource/FileResourceImpl.java
deleted file mode 100644
index e896370aa0..0000000000
--- a/resources/impl/src/main/java/org/jboss/forge/addon/resource/FileResourceImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2012 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Eclipse Public License version 1.0, available at
- * http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.jboss.forge.addon.resource;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Represents any regular file which Furnace does not have any special handler for.
- *
- * @author Mike Brock
- * @author Lincoln Baxter, III
- */
-public class FileResourceImpl extends AbstractFileResource
-{
- public FileResourceImpl(final ResourceFactory factory, final File file)
- {
- super(factory, file);
- }
-
- @Override
- public FileResourceImpl createFrom(final File file)
- {
- return new FileResourceImpl(getResourceFactory(), file);
- }
-
- @Override
- protected List> doListResources()
- {
- return Collections.emptyList();
- }
-
- @Override
- public boolean supports(ResourceFacet type)
- {
- return false;
- }
-}
diff --git a/resources/impl/src/main/java/org/jboss/forge/addon/resource/PathResourceImpl.java b/resources/impl/src/main/java/org/jboss/forge/addon/resource/PathResourceImpl.java
index cd4d1a69d2..7b1f6d63ce 100644
--- a/resources/impl/src/main/java/org/jboss/forge/addon/resource/PathResourceImpl.java
+++ b/resources/impl/src/main/java/org/jboss/forge/addon/resource/PathResourceImpl.java
@@ -50,11 +50,17 @@ protected PathResourceImpl(ResourceFactory factory, Path file) throws IOExceptio
}
@Override
- public boolean create()
+ public boolean createLeaf()
{
- return createNewPath();
+ return getPathOperations().createLeaf(path);
}
-
+
+ @Override
+ public boolean createContainer()
+ {
+ return getPathOperations().createContainer(path);
+ }
+
@Override
public String getName()
{
@@ -98,7 +104,13 @@ public boolean exists()
}
@Override
- public boolean isDirectory()
+ public boolean isLeaf()
+ {
+ return getPathOperations().exists(path) && getPathOperations().existsAndIsDirectory(path);
+ }
+
+ @Override
+ public boolean isContainer()
{
return getPathOperations().existsAndIsDirectory(path);
}
@@ -115,18 +127,6 @@ public void refresh()
lastModification = getPathOperations().getLastModifiedTime(path);
}
- @Override
- public boolean mkdir()
- {
- return getPathOperations().mkdir(path);
- }
-
- @Override
- public boolean mkdirs()
- {
- return getPathOperations().mkdirs(path);
- }
-
@Override
public boolean delete()
{
@@ -224,8 +224,8 @@ public PathResource setContents(final InputStream data)
{
if (!exists())
{
- getParent().mkdirs();
- if (!createNewPath())
+ getParent().createContainer();
+ if (!createLeaf())
{
throw new ResourceException("Failed to create path: " + path);
}
@@ -254,31 +254,6 @@ public PathResource setContents(final InputStream data)
return this;
}
- @Override
- public boolean createNewPath()
- {
- getParent().mkdirs();
- if (getPathOperations().create(path))
- {
- return true;
- }
- return false;
- }
-
- @Override
- public PathResource createTempResource()
- {
- try
- {
- PathResource result = createFrom(Files.createTempFile("forgetemp", ""));
- return result;
- }
- catch (IOException e)
- {
- throw new ResourceException(e.getMessage(), e);
- }
- }
-
@Override
public boolean renameTo(final String pathspec)
{
@@ -388,7 +363,7 @@ public PathResource createFrom(Path path)
@Override
protected List> doListResources()
{
- if (isDirectory())
+ if (isContainer())
{
if (isStale())
{
diff --git a/resources/impl/src/main/java/org/jboss/forge/addon/resource/ResourceFactoryImpl.java b/resources/impl/src/main/java/org/jboss/forge/addon/resource/ResourceFactoryImpl.java
index 4341b5a360..3b50b70ff9 100644
--- a/resources/impl/src/main/java/org/jboss/forge/addon/resource/ResourceFactoryImpl.java
+++ b/resources/impl/src/main/java/org/jboss/forge/addon/resource/ResourceFactoryImpl.java
@@ -115,11 +115,7 @@ public ResourceMonitor monitor(Resource> resource, ResourceFilter resourceFilt
throw new IllegalStateException("Resource must exist to be monitored");
}
- if (resource instanceof FileResource)
- {
- return fileMonitor.registerMonitor(this, (FileResource>) resource, resourceFilter);
- }
- else if (resource instanceof PathResource)
+ if (resource instanceof PathResource)
{
return fileMonitor.registerMonitor(this, (PathResource) resource, resourceFilter);
}
diff --git a/resources/impl/src/main/java/org/jboss/forge/addon/resource/URLResourceImpl.java b/resources/impl/src/main/java/org/jboss/forge/addon/resource/URLResourceImpl.java
index 574ca96bdb..4447f4c964 100644
--- a/resources/impl/src/main/java/org/jboss/forge/addon/resource/URLResourceImpl.java
+++ b/resources/impl/src/main/java/org/jboss/forge/addon/resource/URLResourceImpl.java
@@ -129,4 +129,16 @@ public String toString()
{
return getFullyQualifiedName();
}
+
+ @Override
+ public boolean isLeaf()
+ {
+ return true;
+ }
+
+ @Override
+ public boolean isContainer()
+ {
+ return false;
+ }
}