You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by un...@apache.org on 2003/10/23 18:56:51 UTC
cvs commit: cocoon-2.1/src/blocks/repository/java/org/apache/cocoon/components/source/impl GIFSourceInspector.java
unico 2003/10/23 09:56:51
Modified: src/blocks/repository/java/org/apache/cocoon/components/source/impl
GIFSourceInspector.java
Log:
add method getExposedSourcePropertyTypes(), improve documentation
Revision Changes Path
1.2 +27 -5 cocoon-2.1/src/blocks/repository/java/org/apache/cocoon/components/source/impl/GIFSourceInspector.java
Index: GIFSourceInspector.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/repository/java/org/apache/cocoon/components/source/impl/GIFSourceInspector.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GIFSourceInspector.java 22 Oct 2003 18:53:06 -0000 1.1
+++ GIFSourceInspector.java 23 Oct 2003 16:56:51 -0000 1.2
@@ -70,10 +70,27 @@
*/
public class GIFSourceInspector extends AbstractLogEnabled implements
SourceInspector, ThreadSafe {
-
- private String PROPERTY_NS = "http://apache.org/cocoon/inspector/gif/1.0";
- private static String IMAGE_WIDTH_PROPERTY_NAME = "width";
- private static String IMAGE_HEIGHT_PROPERTY_NAME = "height";
+
+ /**
+ * The namespace uri of the properties exposed by this SourceInspector.
+ * The value is <code>http://apache.org/cocoon/inspector/gif/1.0</code> .
+ */
+ public static final String PROPERTY_NS = "http://apache.org/cocoon/inspector/gif/1.0";
+
+ /**
+ * <code>width</code> property name.
+ */
+ public static final String IMAGE_WIDTH_PROPERTY_NAME = "width";
+
+ /**
+ * <code>height</code> property name.
+ */
+ public static final String IMAGE_HEIGHT_PROPERTY_NAME = "height";
+
+ private static String[] EXPOSED_PROPERTIES = new String[] {
+ PROPERTY_NS + "#" + IMAGE_HEIGHT_PROPERTY_NAME,
+ PROPERTY_NS + "#" + IMAGE_WIDTH_PROPERTY_NAME
+ };
public SourceProperty getSourceProperty(Source source, String namespace, String name)
throws SourceException {
@@ -162,5 +179,10 @@
} catch (Exception e) {}
}
}
+
+ public String[] getExposedSourcePropertyTypes() {
+ return EXPOSED_PROPERTIES;
+ }
+
}