-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b183a6
commit c62e8f1
Showing
10 changed files
with
115 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
simple-ocr-share/src/main/java/es/keensoft/evaluator/OCREvaluator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package es.keensoft.evaluator; | ||
|
||
import org.alfresco.web.evaluator.BaseEvaluator; | ||
import org.json.simple.JSONObject; | ||
|
||
public class OCREvaluator extends BaseEvaluator { | ||
|
||
@Override | ||
public boolean evaluate(JSONObject json) { | ||
|
||
JSONObject node = (JSONObject) json.get("node"); | ||
JSONObject properties = (JSONObject) node.get("properties"); | ||
|
||
if(!properties.containsKey("ocr:versionApplied")) { | ||
return false; | ||
} | ||
|
||
String currentVersion = properties.get("cm:versionLabel").toString(); | ||
String appliedVersion = properties.get("ocr:versionApplied").toString(); | ||
|
||
return currentVersion.equals(appliedVersion); | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
simple-ocr-share/src/main/resources/META-INF/share-config-custom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters