|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjpl.eda.profile.Profile
public class Profile
A profile. Objects of this class are profiles. Profiles are metadata descriptions of resources.
| Field Summary | |
|---|---|
protected java.util.Map |
elements
My elements. |
protected ProfileAttributes |
profAttr
My profile attributes. |
static java.lang.String |
PROFILES_DTD_FPI
The formal public identifier of the profiles DTD. |
static java.lang.String |
PROFILES_DTD_URL
The system identifier of the profiles DTD. |
protected ResourceAttributes |
resAttr
My resource attributes. |
| Constructor Summary | |
|---|---|
Profile()
Create a blank profile. |
|
Profile(org.w3c.dom.Node root)
Creates a new Profile instance. |
|
Profile(org.w3c.dom.Node root,
ObjectFactory factory)
Create a profile from an XML document. |
|
Profile(ProfileAttributes profAttr,
ResourceAttributes resAttr)
Create a profile from its attributes. |
|
Profile(java.lang.String string)
Create a profile from an XML document. |
|
Profile(java.lang.String string,
ObjectFactory factory)
Create a profile from an XML document. |
|
| Method Summary | |
|---|---|
void |
addToModel(com.hp.hpl.mesa.rdf.jena.model.Model model)
Add this profile as an RDF resource description to an RDF model. |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object rhs)
|
static org.w3c.dom.Document |
createProfileDocument()
Create a <profile> document using the profiles DTD. |
static java.util.List |
createProfiles(org.w3c.dom.Element root)
Create a list of profiles by deserializing data from the given XML element. |
static java.util.List |
createProfiles(org.w3c.dom.Element root,
ObjectFactory factory)
Create a list of profiles by deserializing data from the given XML element. |
static org.w3c.dom.Document |
createProfilesDocument()
Create a <profiles> document using the profiles DTD. |
boolean |
equals(java.lang.Object rhs)
|
ProfileAttributes |
getProfileAttributes()
Get the profile attributes. |
java.util.Map |
getProfileElements()
Get the profile elements. |
ResourceAttributes |
getResourceAttributes()
Get the resource attributes. |
java.net.URI |
getURI()
|
int |
hashCode()
|
static void |
main(java.lang.String[] argv)
Try to parse an XML profile in a file in its XML vocabulary. |
void |
setProfileAttributes(ProfileAttributes profAttr)
Set this profile's profile attributes. |
void |
setResourceAttributes(ResourceAttributes resAttr)
Set this profile's resource attributes. |
java.lang.String |
toString()
|
org.w3c.dom.Node |
toXML(org.w3c.dom.Document doc)
Serialize this profile as an XML node. |
org.w3c.dom.Node |
toXMLWithoutElements(org.w3c.dom.Document doc)
Serialize this profile as an XML node but without any elements. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PROFILES_DTD_FPI
public static java.lang.String PROFILES_DTD_URL
protected ProfileAttributes profAttr
protected ResourceAttributes resAttr
protected java.util.Map elements
String) to ProfileElement.
| Constructor Detail |
|---|
public Profile()
public Profile(java.lang.String string)
throws org.xml.sax.SAXException
string - The XML document (as a string).
org.xml.sax.SAXException - If the string can't be parsed.
public Profile(java.lang.String string,
ObjectFactory factory)
throws org.xml.sax.SAXException
string - The XML document (as a string).factory - Object factory to use.
org.xml.sax.SAXException - If the string can't be parsed.public Profile(org.w3c.dom.Node root)
Profile instance.
root - a Node value.
public Profile(org.w3c.dom.Node root,
ObjectFactory factory)
root - The <profile> element.
public Profile(ProfileAttributes profAttr,
ResourceAttributes resAttr)
profAttr - Profile attributes.resAttr - Resource attributes.| Method Detail |
|---|
public static java.util.List createProfiles(org.w3c.dom.Element root,
ObjectFactory factory)
root - Either a <profiles> or a <profile> element.factory - Factory for creation of profile-related objects.
public static java.util.List createProfiles(org.w3c.dom.Element root)
Profile, ProfileAttributes, ResourceAttributes,
and ProfileElement and its subclasses.
root - Either a <profiles> or a <profile> element.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object rhs)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object rhs)
compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic ProfileAttributes getProfileAttributes()
public ResourceAttributes getResourceAttributes()
public void setProfileAttributes(ProfileAttributes profAttr)
profAttr - a ProfileAttributes value.public void setResourceAttributes(ResourceAttributes resAttr)
resAttr - a ResourceAttributes value.public java.util.Map getProfileElements()
String) to ProfileElement.
public java.net.URI getURI()
public void addToModel(com.hp.hpl.mesa.rdf.jena.model.Model model)
throws com.hp.hpl.mesa.rdf.jena.model.RDFException
model - Model to which to add the profile and its related descriptions.
com.hp.hpl.mesa.rdf.jena.model.RDFException - if an error occurs.
public org.w3c.dom.Node toXML(org.w3c.dom.Document doc)
throws org.w3c.dom.DOMException
toXML in interface jpl.eda.util.Documentabledoc - The document that will own this node.
org.w3c.dom.DOMException - If an error occurs creating the XML nodes.
public org.w3c.dom.Node toXMLWithoutElements(org.w3c.dom.Document doc)
throws org.w3c.dom.DOMException
doc - The document that will own this node.
org.w3c.dom.DOMException - If an error occurs creating the XML nodes.public static org.w3c.dom.Document createProfilesDocument()
public static org.w3c.dom.Document createProfileDocument()
public static void main(java.lang.String[] argv)
throws java.lang.Throwable
argv - Command-line arguments, of which there should be one, the name of XML file containing the profile to parse
java.lang.Throwable - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||