From: <rv...@us...> - 2010-03-15 01:28:37
|
Revision: 585 http://treebase.svn.sourceforge.net/treebase/?rev=585&view=rev Author: rvos Date: 2010-03-15 01:28:29 +0000 (Mon, 15 Mar 2010) Log Message: ----------- This is a simple object that holds just enough to create a semantic annotation in nexml, or a triple in rdf. Added Paths: ----------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/Annotation.java Added: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/Annotation.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/Annotation.java (rev 0) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/Annotation.java 2010-03-15 01:28:29 UTC (rev 585) @@ -0,0 +1,55 @@ +package org.cipres.treebase.domain; + +import java.net.URI; + +public class Annotation { + private URI mURI; + private String mProperty; + private Object mValue; + + /** + * + * @param uri + * @param property + * @param value + */ + public Annotation (URI uri, String property, Object value) { + mURI = uri; + mProperty = property; + mValue = value; + } + + /** + * + * @return + */ + public URI getURI() { // XXX change me to getUri + return mURI; + } + + /** + * + * @return + */ + public String getProperty () { + return mProperty; + } + + /** + * + * @return + */ + public Object getValue() { + return mValue; + } + + /** + * + * @return + */ + public String getPrefix() { + String[] curie = mProperty.split(":"); + return curie[0]; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |