Author: tdraier
Date: Thu Jan 10 10:54:43 2008
New Revision: 19487
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19487&repname=
=3Djahia
Log:
removed old code for compilation issue
Modified:
branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/ExifExtractor.java
branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/OfficeExtractor.java
Modified: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahi=
a/services/content/automation/ExifExtractor.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-3-=
DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/services/content/automation/E=
xifExtractor.java&rev=3D19487&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/ExifExtractor.java (original)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/ExifExtractor.java Thu Jan 10 10:54:43 2008
@@ -21,25 +21,6 @@
* To change this template use File | Settings | File Templates.
*/
public class ExifExtractor implements Extractor {
- public boolean execute(Context context, Node action) throws Repository=
Exception {
- try {
- Node node =3D context.getCurrentNode();
- Map extractedProperties =3D (Map) context.getAttribute("office=
dExtractedProperties");
- if (extractedProperties =3D=3D null) {
- Node contentNode =3D node.getNode(Constants.JCR_CONTENT);
- extractedProperties =3D extract(contentNode.getProperty(Co=
nstants.JCR_DATA).getStream());
- context.setAttribute("officedExtractedProperties", extract=
edProperties);
- }
- String source =3D action.getProperty("source").getString();
- if (extractedProperties.containsKey(source)) {
- String s =3D (String) extractedProperties.get(source);
- node.setProperty(action.getProperty("property").getString(=
), s);
- }
- } catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use =
File | Settings | File Templates.
- }
- return true;
- }
=
public Map extract(InputStream content) throws Exception {
Map m =3D new HashMap();
Modified: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahi=
a/services/content/automation/OfficeExtractor.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-3-=
DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/services/content/automation/O=
fficeExtractor.java&rev=3D19487&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/OfficeExtractor.java (original)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/OfficeExtractor.java Thu Jan 10 10:54:43 2008
@@ -20,44 +20,6 @@
* To change this template use File | Settings | File Templates.
*/
public class OfficeExtractor implements Extractor {
- public boolean execute(Context context, Node action) throws Repository=
Exception {
- try {
- Node node =3D context.getCurrentNode();
- Map extractedProperties =3D (Map) context.getAttribute("office=
dExtractedProperties");
- if (extractedProperties =3D=3D null) {
- Node contentNode =3D node.getNode(Constants.JCR_CONTENT);
- extractedProperties =3D extract(contentNode.getProperty(Co=
nstants.JCR_DATA).getStream());
- context.setAttribute("officedExtractedProperties", extract=
edProperties);
- }
- String source =3D action.getProperty("source").getString();
- if (extractedProperties.containsKey(source)) {
- Object o =3D extractedProperties.get(source);
- if (o instanceof String) {
- node.setProperty(action.getProperty("property").getStr=
ing(), (String) o);
- } else if (o instanceof Long) {
- node.setProperty(action.getProperty("property").getStr=
ing(), ((Long) o).longValue());
- } else if (o instanceof Date) {
- Calendar c =3D new GregorianCalendar();
- c.setTime((Date) o);
- node.setProperty(action.getProperty("property").getStr=
ing(), c);
- } else if (o instanceof byte[]) {
- if (action.hasProperty("property")) {
- node.setProperty(action.getProperty("property").ge=
tString(), new ByteArrayInputStream((byte[])o));
- } else if (action.hasProperty("resourceNode")) {
- Node resource =3D node.addNode(action.getProperty(=
"resourceNode").getString(), Constants.NT_RESOURCE);
- resource.setProperty(Constants.JCR_DATA, new ByteA=
rrayInputStream((byte[])o));
- resource.setProperty(Constants.JCR_MIMETYPE, "bina=
ry/octet-stream");
- resource.setProperty(Constants.JCR_LASTMODIFIED, n=
ew GregorianCalendar());
- }
- }
- }
-
- } catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use =
File | Settings | File Templates.
- }
- return true;
- }
-
public Map extract(InputStream content) throws Exception {
OfficePropertiesListener listener =3D new OfficePropertiesListener=
();
try {
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list