|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biomoby.shared.schema.Builder
public class Builder
| Field Summary | |
|---|---|
static org.jdom.Namespace |
namespace
|
| Constructor Summary | |
|---|---|
Builder()
|
|
| Method Summary | |
|---|---|
void |
addArticleNameType(org.jdom.Element roots,
String types,
Vector articles)
Given a vector containing possible article names and type name, add an XML Schema element to describe the restriction. |
void |
addDescriptNote(String str,
org.jdom.Element parent)
add description or comment element to the element parent. |
void |
addPrimitiveComplexType(org.jdom.Element parent,
String name,
String base)
add a complexType for string to the root element; Element parent is the root Element. |
void |
addPrimitiveElement(PrimitiveVector pri,
org.jdom.Element element)
add all primitive element to the sequnece element. |
void |
addPrimitiveSimpleType(org.jdom.Element parent,
Vector vc,
String name)
add simpleType for the primitive element; create a enumeration XML schema element for article names. |
void |
addUniqueElement(org.jdom.Element parent,
String name,
Vector strV)
add an unique element as a child of an element parent. |
org.jdom.Element |
buildMobyEncapsulatedSchema(String name)
|
org.jdom.Element |
buildSchema(String name)
Given a string, we will give a element represnting an xml schema which describe the object of the name. |
org.jdom.Element |
getArticleName(String article)
create an xml schema element for article name attribute of a moby object |
org.jdom.Element |
getComplexType(MElement m,
String typeName)
create a complexType XML schema element for MElement which does not have has or hasa relation with other MElement |
org.jdom.Element |
getComplexTypeRec(MElement m,
String typeName,
Vector vc1)
recursively get a complexType XML Shema element for MElement; when this MElement does not have has and hasa relation, we use another method called getComplexType; |
static String |
getDate()
get the date of current time |
void |
getElement(MElement m)
the input is a MElement object; we will find all its hasa and has relations with other object; then modify the root element of the output xml file; the root element is the root element of a xml schema xml file. |
void |
getFirstLevel(MElement m,
org.jdom.Element rt)
create the top level of xml schema element for a moby object. |
org.jdom.Element |
getIDAttribute()
create an xml schema element for ID attribute 0f a moby object. |
org.jdom.Element |
getNamespaceAttribute()
create an xml schema element for namescape attribute of the moby element. |
org.jdom.Element |
getRestrictionArticleName(Vector vc)
create an xml schema element for articleName attribute if the values of the articleName can have multiple choices. |
static org.jdom.Element |
getRoot(String str)
create a root element for the schema to begin. |
static void |
main(String[] args)
|
void |
set3Attributes(MElement m,
org.jdom.Element types,
Vector ar)
Add ID, namespace and article attributes elements into Element types; every moby object has these three attributes. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static org.jdom.Namespace namespace
| Constructor Detail |
|---|
public Builder()
| Method Detail |
|---|
public org.jdom.Element buildSchema(String name)
name - the name of object
public org.jdom.Element buildMobyEncapsulatedSchema(String name)
name - the name of the Moby data type that a complete moby message schema document will be created for
public void getElement(MElement m)
m - a MElement
public void addArticleNameType(org.jdom.Element roots,
String types,
Vector articles)
roots - the root element of the XML Schematypes - the name of XML Schema simpleTypearticles - a vector containing different article names
public void set3Attributes(MElement m,
org.jdom.Element types,
Vector ar)
m - a MElementtypes - the type of MElement; there is a field in MElementar - a vector containing all possible article names for this MElement
public void getFirstLevel(MElement m,
org.jdom.Element rt)
m - a MElementrt - a xML Schema root element
public org.jdom.Element getComplexTypeRec(MElement m,
String typeName,
Vector vc1)
m - a MElement objecttypeName - the name of complexTypevc1 - a vector containing all possible article names for the MElement
public org.jdom.Element getComplexType(MElement m,
String typeName)
m - a MElementtypeName - the name of the complexType
public org.jdom.Element getNamespaceAttribute()
public org.jdom.Element getIDAttribute()
public org.jdom.Element getArticleName(String article)
article - value of the article attribute
public org.jdom.Element getRestrictionArticleName(Vector vc)
vc - a vector containing possible values of articleName attribute
public static org.jdom.Element getRoot(String str)
str -
public void addDescriptNote(String str,
org.jdom.Element parent)
str - the description of an elementparent - the element which we wnat to give a descriptionpublic static String getDate()
public void addPrimitiveElement(PrimitiveVector pri,
org.jdom.Element element)
pri - a PrimitiveVector objectelement - a XML Schema element
public void addUniqueElement(org.jdom.Element parent,
String name,
Vector strV)
parent - the parent element of unique elementname - the name of the unique elementstrV - a Vector containing the name of MElement in a hasa Vector
public void addPrimitiveComplexType(org.jdom.Element parent,
String name,
String base)
parent - the parent element of this complexTpe element which is a root element herename - the complexType namebase - the base we will extend
public void addPrimitiveSimpleType(org.jdom.Element parent,
Vector vc,
String name)
parent - the root elementvc - a vector containing article namesname - the name of this simpleTypepublic static void main(String[] args)
args - the string array containing the arguments for this main method
|
Version: 1.1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||