add virtual flag in entry
[jSite2.git] / src / net / pterodactylus / jsite / project / AbstractEntry.java
index 5c3c3bd..4f6e6ed 100644 (file)
@@ -37,6 +37,9 @@ public abstract class AbstractEntry extends AbstractBean implements Entry {
        /** The name of the “content type” property. */
        public static final String PROPERTY_CONTENT_TYPE = "contentType";
 
+       /** Whether this entry is virtual. */
+       private final boolean virtual;
+
        /** The name of the file. */
        private String name;
 
@@ -47,6 +50,24 @@ public abstract class AbstractEntry extends AbstractBean implements Entry {
        private String contentType;
 
        /**
+        * Creates a new entry.
+        * 
+        * @param virtual
+        *            <code>true</code> if this entry is virtual,
+        *            <code>false</code> otherwise
+        */
+       protected AbstractEntry(boolean virtual) {
+               this.virtual = virtual;
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public boolean isVirtual() {
+               return virtual;
+       }
+
+       /**
         * {@inheritDoc}
         */
        public String getName() {