|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.shared.MobyObjectDecompositionImpl
public class MobyObjectDecompositionImpl
Note: if you are using this class with java 1.4.x,
use the Endorsed Standards Override Mechanism to over-ride org.w3c.dom. Place the
Xerces-J jars in the For questions, comments, or bugs
email me at edward.kawas@gmail.com
Constructor Summary | |
---|---|
MobyObjectDecompositionImpl()
|
Method Summary | |
---|---|
Object |
clone()
|
MobyDataObject |
createPrimitiveType(String localName,
String articleName)
|
MobyDataObject[] |
getFlattenedPrims(String object)
PRE:None. |
Map |
getObjectComposition(String name,
String endpoint)
PRE:None. |
static String |
getTextContent(Node parent)
Method to simulate DOM level 3 (Java 1.5 default) method for recursively getting text children from a Node. |
static String |
getTextContent(Node parent,
boolean includeChildrensText)
Grabs the text and CDATA children of a Node (not necessairly contiguous) and returns them concatenated. |
boolean |
isPrimitive(String object)
PRE:None. |
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MobyObjectDecompositionImpl()
Method Detail |
---|
public final MobyDataObject[] getFlattenedPrims(String object)
MobyObjectDecomposition
POST:If object is a valid MOBY object, then all of the primitives in the objects HAS and HASA containers are returned as an array of strings.
getFlattenedPrims
in interface MobyObjectDecomposition
object
- - the object to flatten into its primitives.
public static String getTextContent(Node parent)
public static String getTextContent(Node parent, boolean includeChildrensText)
parent
- the node who's text children should be concatenatedincludeChildrensText
- if true, recursively appends children's text depth first
public final Map getObjectComposition(String name, String endpoint) throws MobyException
MobyObjectDecomposition
POST:A Map of relationships with the keys being "isa", "has", and "hasa". The values are string arrays or null if no relationship exists.
getObjectComposition
in interface MobyObjectDecomposition
name
- - the object to decompose into its HAS & HASA container objects.
MobyException
- - if no such object exists in the MOBY ontology.public final boolean isPrimitive(String object)
MobyObjectDecomposition
POST:if object is a primitive, boolean true is returned, otherwise false is returned.
isPrimitive
in interface MobyObjectDecomposition
object
- - the MOBY object to check.
public final MobyDataObject createPrimitiveType(String localName, String articleName)
public final Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static void main(String[] args) throws MobyException
MobyException
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |