-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
40 changed files
with
998 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>uims.bst</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.maven.ide.eclipse.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.maven.ide.eclipse.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
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,7 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
fullBuildGoals=process-test-resources | ||
resolveWorkspaceProjects=true | ||
resourceFilterGoals=process-resources resources\:testResources | ||
skipCompilerPlugin=true | ||
version=1 |
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"/> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> | ||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>bst.esb.services.provider</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.maven.ide.eclipse.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.maven.ide.eclipse.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
5 changes: 5 additions & 0 deletions
5
uims.bst/bst.esb.services.provider/.settings/org.eclipse.jdt.core.prefs
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,5 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | ||
org.eclipse.jdt.core.compiler.compliance=1.5 | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.5 |
7 changes: 7 additions & 0 deletions
7
uims.bst/bst.esb.services.provider/.settings/org.maven.ide.eclipse.prefs
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,7 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
fullBuildGoals=process-test-resources | ||
resolveWorkspaceProjects=true | ||
resourceFilterGoals=process-resources resources\:testResources | ||
skipCompilerPlugin=true | ||
version=1 |
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,4 @@ | ||
# Configure the created bundle | ||
private.packages=org.bst.esb.services.provider | ||
import.packages=* | ||
export.packages=* |
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,94 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>uims.bst</artifactId> | ||
<groupId>com.uims.bst</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<packaging>bundle</packaging> | ||
<groupId>com.uims.bst</groupId> | ||
<artifactId>bst.esb.services.provider</artifactId> | ||
<version>1.0.0</version> | ||
|
||
<name>bst.esb.services.provider</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>org.apache.felix.ipojo.annotations</artifactId> | ||
<version>1.6.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.uims.bst</groupId> | ||
<artifactId>bst.esb.services</artifactId> | ||
<version>1.0.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.17</version> | ||
<type>bundle</type> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<version>2.1.0</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<instructions> | ||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
<Private-Package>${private.packages}</Private-Package> | ||
<Import-Package>${import.packages}</Import-Package> <!-- defined in bundle.properties --> | ||
<Export-Package>${export.packages}</Export-Package> <!-- define in bundle.properties --> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-ipojo-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>ipojo-bundle</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.5</source> | ||
<target>1.5</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<!-- Simply read properties from file --> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>properties-maven-plugin</artifactId> | ||
<version>1.0-alpha-2</version> | ||
<executions> | ||
<execution> | ||
<phase>initialize</phase> | ||
<goals> | ||
<goal>read-project-properties</goal> | ||
</goals> | ||
<configuration> | ||
<files> | ||
<file>bundle.properties</file> | ||
</files> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
47 changes: 47 additions & 0 deletions
47
...bst/bst.esb.services.provider/src/main/java/org/bst/esb/services/provider/OCRService.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,47 @@ | ||
package org.bst.esb.services.provider; | ||
|
||
import java.io.InputStream; | ||
|
||
import org.apache.felix.ipojo.annotations.Component; | ||
import org.apache.felix.ipojo.annotations.Instantiate; | ||
import org.apache.felix.ipojo.annotations.Provides; | ||
import org.apache.log4j.Logger; | ||
import org.bst.esb.services.OCRUtils; | ||
|
||
@Component(name="OCRService") | ||
@Provides | ||
@Instantiate(name="OCRService") | ||
public class OCRService implements OCRUtils { | ||
|
||
Logger log = Logger.getLogger(OCRService.class.getName()); | ||
|
||
public String analyze(InputStream img) { | ||
String check = null; | ||
log.info("use robot ocr service...."); | ||
check = robotOCR(img); | ||
if (check == null) { | ||
log.info("use manual ocr service...."); | ||
check = manualOCR(img); | ||
} | ||
if (check == null) { | ||
log.info("There is something wrong with ocr manual service"); | ||
} | ||
return check; | ||
} | ||
|
||
private String manualOCR(InputStream img) { | ||
String check = null; | ||
|
||
// TODO Auto-generated method stub | ||
return check; | ||
|
||
} | ||
|
||
private String robotOCR(InputStream img) { | ||
String check = null; | ||
|
||
// TODO Auto-generated method stub | ||
return check; | ||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
...t/bst.esb.services.provider/src/main/java/org/bst/esb/services/provider/OrderService.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,34 @@ | ||
package org.bst.esb.services.provider; | ||
|
||
import java.io.InputStream; | ||
|
||
import org.apache.felix.ipojo.annotations.Component; | ||
import org.apache.felix.ipojo.annotations.Instantiate; | ||
import org.apache.felix.ipojo.annotations.Provides; | ||
import org.apache.log4j.Logger; | ||
import org.bst.esb.services.OrderUtils; | ||
import org.bst.esb.services.TipInfo; | ||
|
||
@Component(name = "OrderService") | ||
@Provides | ||
@Instantiate(name = "OrderService") | ||
public class OrderService implements OrderUtils { | ||
|
||
Logger log = Logger.getLogger(OrderService.class.getName()); | ||
|
||
public void finishInfoGet(TipInfo ti) { | ||
// TODO Auto-generated method stub | ||
log.info("Update Order Info £º" + ti.getContent()); | ||
updateOrderInfo(ti); | ||
} | ||
|
||
private void updateOrderInfo(TipInfo ti) { | ||
saveOrderInfoToDb(ti); | ||
} | ||
|
||
private void saveOrderInfoToDb(TipInfo ti) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
uims.bst/bst.esb.services.provider/src/main/resources/metadata.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/CURRENT/core.xsd" | ||
xmlns="org.apache.felix.ipojo"> | ||
<!-- | ||
Declare your component types and instances here | ||
--> | ||
|
||
<!-- | ||
<component classname="$YOUR_COMPONENT_CLASS"> | ||
</component> | ||
<instance component="$YOUR_COMPONENT_CLASS" /> | ||
--> | ||
</ipojo> |
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,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"/> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> | ||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>bst.esb.services</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.maven.ide.eclipse.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.maven.ide.eclipse.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
5 changes: 5 additions & 0 deletions
5
uims.bst/bst.esb.services/.settings/org.eclipse.jdt.core.prefs
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,5 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | ||
org.eclipse.jdt.core.compiler.compliance=1.5 | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.5 |
7 changes: 7 additions & 0 deletions
7
uims.bst/bst.esb.services/.settings/org.maven.ide.eclipse.prefs
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,7 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
fullBuildGoals=process-test-resources | ||
resolveWorkspaceProjects=true | ||
resourceFilterGoals=process-resources resources\:testResources | ||
skipCompilerPlugin=true | ||
version=1 |
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,4 @@ | ||
# Configure the created bundle | ||
private.packages= | ||
import.packages= | ||
export.packages=org.bst.esb.services |
Oops, something went wrong.