Changeset 3221
- Timestamp:
- 08/02/13 13:29:30 (11 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend
- Files:
-
- 10 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/nb-configuration.xml
r3220 r3221 20 20 <config-files> 21 21 <config-file>src/main/resources/spring-config/sourceDao.xml</config-file> 22 <config-file>src/test/resources/spring-test-config/mockSourceDao.xml.xml</config-file> 22 <config-file>src/main/resources/spring-config/VersionDao.xml</config-file> 23 <config-file>src/main/resources/spring-config/CachedRepresentationDao.xml</config-file> 24 <config-file>src/test/resources/spring-test-config/mockVersionDao.xml</config-file> 25 <config-file>src/test/resources/spring-test-config/mockCachedRepresenationDao.xml</config-file> 23 26 </config-files> 24 27 <config-file-groups/> -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/BackendConstants.java
r3220 r3221 31 31 public static final int USER_HASH_PARAM_1 = 5; 32 32 public static final int USER_HASH_PARAM_2 = 19; 33 34 // peter, is it okay? 33 35 public static final int SOURCE_HASH_PARAM_1 = 7; 34 36 public static final int SOURCE_HASH_PARAM_2 = 23; 37 public static final int CACHED_REPRESENTATION_HASH_PARAM_1 = 7; 38 public static final int CACHED_REPRESENTATION_HASH_PARAM_2 = 19; 39 public static final int VERSION_HASH_PARAM_1 = 5; 40 public static final int VERSION_HASH_PARAM_2 = 29; 41 35 42 public static final String regExpIdentifier = "[a-zA-Z0-9_-]*"; 36 43 } -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcAnnotationDao.java
r3220 r3221 171 171 result.setOwner(ownerREF); 172 172 173 //////////////////////////174 173 List<SourceInfo> sourceInfoList = jdbcSourceDao.getSourceInfos(rs.getInt(annotation_id)); 175 174 NewOrExistingSourceInfos noeSourceInfos = jdbcSourceDao.contructNewOrExistingSourceInfo(sourceInfoList); 176 // List<NewOrExistingSourceInfo> noeSourceInfoList = new ArrayList<NewOrExistingSourceInfo>();177 // for (SourceInfo sourceInfo: sourceInfoList) {178 // NewOrExistingSourceInfo noeSourceInfo = new NewOrExistingSourceInfo();179 // noeSourceInfo.setSource(sourceInfo);180 // noeSourceInfoList.add(noeSourceInfo);181 // }182 //183 //184 // NewOrExistingSourceInfos noeSourceInfos = new NewOrExistingSourceInfos();185 // noeSourceInfos.getTarget().addAll(noeSourceInfoList);186 175 result.setTargetSources(noeSourceInfos); 187 ////////////////////////////////188 176 189 177 result.setBody(convertToAnnotationBody(rs.getString(body_xml))); -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcResourceDao.java
r3220 r3221 32 32 public class JdbcResourceDao extends SimpleJdbcDaoSupport implements ResourceDao{ 33 33 34 // base string constants: table Names34 // base string constants: resource table Names 35 35 final static protected String notebookTableName = "notebook"; 36 36 final static protected String annotationTableName = "annotation"; 37 final static protected String sourceTableName = "source"; 38 final static protected String principalTableName = "principal"; 37 final static protected String sourceTableName = "source"; 38 final static protected String sourcesTableName = "target_source"; 39 final static protected String cachedRepresentationTableName = "cached_representation_info"; 40 final static protected String versionTableName = "version"; 41 final static protected String principalTableName = "principal"; 42 // joint tablenames 43 39 44 final static protected String notebooksAnnotationsTableName = "notebooks_annotations"; 40 45 final static protected String permissionsTableName = "annotations_principals_permissions"; 41 final static protected String sourcesTableName = "target_source";42 46 final static protected String annotationsSourcesTableName = "annotations_target_sources"; 47 final static protected String versionsCachedRepresentationsTableName = "versions+cached_representations"; 48 43 49 44 50 // base string constants: field Names … … 57 63 final static protected String link = "link"; 58 64 final static protected String version = "version"; 65 final static protected String cached_representation_id = "cached_representation_id"; 66 final static protected String version_id = "version_id"; 67 final static protected String mime_type = "mime_type"; 68 final static protected String tool = "tool"; 69 final static protected String type_ = "type_"; 70 final static protected String where_is_the_file = "where_is_the_file"; 59 71 60 72 // derived string constants: table+field names -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/MockObjectsFactory.java
r3220 r3221 19 19 20 20 import eu.dasish.annotation.backend.dao.AnnotationDao; 21 import eu.dasish.annotation.backend.dao.CachedRepresentationDao; 21 22 import eu.dasish.annotation.backend.dao.NotebookDao; 22 23 import eu.dasish.annotation.backend.dao.PermissionsDao; 23 24 import eu.dasish.annotation.backend.dao.SourceDao; 24 25 import eu.dasish.annotation.backend.dao.UserDao; 26 import eu.dasish.annotation.backend.dao.VersionDao; 25 27 import org.jmock.Mockery; 26 28 … … 57 59 return context.mock(SourceDao.class); 58 60 } 61 62 public CachedRepresentationDao newCachedRepresentationDao() { 63 return context.mock(CachedRepresentationDao.class); 64 } 65 66 public VersionDao newVersionDao() { 67 return context.mock(VersionDao.class); 68 } 59 69 }
Note: See TracChangeset
for help on using the changeset viewer.