From: <rv...@us...> - 2009-06-19 02:15:46
|
Revision: 63 http://treebase.svn.sourceforge.net/treebase/?rev=63&view=rev Author: rvos Date: 2009-06-19 02:14:12 +0000 (Fri, 19 Jun 2009) Log Message: ----------- Added attachAnnotation(String key,String value,URI,Annotatable) method and mPrismURI static field. Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlObjectConverter.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlObjectConverter.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlObjectConverter.java 2009-06-19 02:12:51 UTC (rev 62) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/nexml/NexmlObjectConverter.java 2009-06-19 02:14:12 UTC (rev 63) @@ -15,7 +15,9 @@ public class NexmlObjectConverter extends AbstractNexusConverter { protected static URI mDCURI; + protected static URI mPrismURI; private static String mDCURIString = "http://purl.org/dc/elements/1.1/"; + private static String mPrismURIString = "http://prismstandard.org/namespaces/1.2/basic/"; private static String mDCIdentifier = "dc:identifier"; public static String TreeBASE2Prefix = "TreeBASE2"; private Document mDocument; @@ -28,9 +30,10 @@ public NexmlObjectConverter(Study study, TaxonLabelHome taxonLabelHome, Document document) { try { mDCURI = new URI(mDCURIString); + mPrismURI = new URI(mPrismURIString); } catch (URISyntaxException e) { e.printStackTrace(); - } + } setTaxonLabelHome(taxonLabelHome); setStudy(study); setDocument(document); @@ -57,12 +60,23 @@ * @param tbPersistable */ protected void attachTreeBaseID(Annotatable annotatable,TBPersistable tbPersistable) { - annotatable.addAnnotationValue(mDCIdentifier, mDCURI, makeNamespacedID(tbPersistable)); + attachAnnotation(mDCIdentifier,makeNamespacedID(tbPersistable),mDCURI,annotatable); } /** * + * @param key + * @param value + * @param namespace * @param annotatable + */ + protected void attachAnnotation(String key,String value,URI namespace,Annotatable annotatable) { + annotatable.addAnnotationValue(key, namespace, value); + } + + /** + * + * @param annotatable * @param persistableClass * @return */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |