Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
ikylin committed Jun 10, 2012
1 parent 9edfc1d commit b266de2
Show file tree
Hide file tree
Showing 40 changed files with 998 additions and 0 deletions.
17 changes: 17 additions & 0 deletions uims.bst/.project
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>
7 changes: 7 additions & 0 deletions uims.bst/.settings/org.maven.ide.eclipse.prefs
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
8 changes: 8 additions & 0 deletions uims.bst/bst.esb.services.provider/.classpath
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>
23 changes: 23 additions & 0 deletions uims.bst/bst.esb.services.provider/.project
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>
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
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
4 changes: 4 additions & 0 deletions uims.bst/bst.esb.services.provider/bundle.properties
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=*
94 changes: 94 additions & 0 deletions uims.bst/bst.esb.services.provider/pom.xml
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>
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;
}

}
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 uims.bst/bst.esb.services.provider/src/main/resources/metadata.xml
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>
8 changes: 8 additions & 0 deletions uims.bst/bst.esb.services/.classpath
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>
23 changes: 23 additions & 0 deletions uims.bst/bst.esb.services/.project
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>
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
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
4 changes: 4 additions & 0 deletions uims.bst/bst.esb.services/bundle.properties
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
Loading

0 comments on commit b266de2

Please sign in to comment.