TPTP 4.4.0 Monitoring Tools Project
Internal API Specification

org.eclipse.tptp.wsdm.tooling.util.internal
Class CapUtils

java.lang.Object
  extended byorg.eclipse.tptp.wsdm.tooling.util.internal.CapUtils

public class CapUtils
extends java.lang.Object

Utility class to handle different parts of capability.


Constructor Summary
CapUtils()
           
 
Method Summary
static org.w3c.dom.Document createDocument(org.xml.sax.InputSource source)
          Creates DOM document from InputSource.
static org.w3c.dom.Document createDocument(java.io.InputStream stream)
          Creates DOM document from InputStream.
static org.w3c.dom.Document createDocument(java.lang.String xml)
          Creates DOM document from XML String.
static java.lang.String getCapabilityNameFromQName(java.lang.String qname)
          Returns the capability name form qname.
static java.lang.String getCapabilityPrefixFromQName(java.lang.String qname)
          Returns the capability prefix form qname.
static int getInstancesOfOperation(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability model, java.lang.String opName)
          Returns the instances of operation of the given name.
static int getInstancesOfParameter(CapabilityDefinition capabilityDefinition, javax.wsdl.Operation operation, java.lang.String paramName)
          Returns the instances of parameter of the given name.
static int getInstancesOfProperty(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability model, java.lang.String propName)
          Returns the instances of property of the given name.
static int getMaxOccurs(org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement, org.eclipse.xsd.XSDElementDeclaration property)
          Returns the maxoccurs of property.
static int getMinOccurs(org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement, org.eclipse.xsd.XSDElementDeclaration property)
          Returns the minoccurs of property.
static java.lang.String getName(org.eclipse.tptp.wsdm.tooling.model.capabilities.Property property)
          Returns the name of the property.
static java.lang.String getNamespace(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability cap)
          Returns the namespace of given capability.
static java.util.List getPropertiesSchemas(CapabilityDefinition definition, org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement)
          Retruns the list of XSDSchemas that represents the container of properties of capability.
static org.eclipse.tptp.wsdm.tooling.model.capabilities.Property getProperty(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability capability, java.lang.String namespace, java.lang.String propertyName)
          Returns the property of the given name.
static org.eclipse.xsd.XSDElementDeclaration[] getResolvedProperties(CapabilityDefinition definition, org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement)
          Returns the properties resolved from resourcePropertyElement.
static org.eclipse.tptp.wsdm.tooling.model.capabilities.Topic getRootTopic(org.eclipse.tptp.wsdm.tooling.model.capabilities.Topic topic)
          This method will retun the root topic , provided any child topic or root topic itself.
static boolean isOperationNameConflicted(java.lang.String operationName)
          Returns true if given operation name conflicted with super java capability implementation classes.
static boolean isRootTopic(org.eclipse.tptp.wsdm.tooling.model.capabilities.Topic topic)
          Return true if given topic is a root topic
static java.lang.String validateJavaIdentifier(java.lang.String name)
          Validate whether given string is valid identifier or not NOTE : Fix for defect [#47609] Validation needed on text fields in editors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapUtils

public CapUtils()
Method Detail

getRootTopic

public static org.eclipse.tptp.wsdm.tooling.model.capabilities.Topic getRootTopic(org.eclipse.tptp.wsdm.tooling.model.capabilities.Topic topic)
This method will retun the root topic , provided any child topic or root topic itself. Recursively find the root topic.


isRootTopic

public static boolean isRootTopic(org.eclipse.tptp.wsdm.tooling.model.capabilities.Topic topic)
Return true if given topic is a root topic


getCapabilityNameFromQName

public static java.lang.String getCapabilityNameFromQName(java.lang.String qname)
Returns the capability name form qname.


getCapabilityPrefixFromQName

public static java.lang.String getCapabilityPrefixFromQName(java.lang.String qname)
Returns the capability prefix form qname.


getNamespace

public static java.lang.String getNamespace(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability cap)
Returns the namespace of given capability.


getPropertiesSchemas

public static java.util.List getPropertiesSchemas(CapabilityDefinition definition,
                                                  org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement)
Retruns the list of XSDSchemas that represents the container of properties of capability.


getMinOccurs

public static int getMinOccurs(org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement,
                               org.eclipse.xsd.XSDElementDeclaration property)
Returns the minoccurs of property.


getMaxOccurs

public static int getMaxOccurs(org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement,
                               org.eclipse.xsd.XSDElementDeclaration property)
Returns the maxoccurs of property.


getResolvedProperties

public static org.eclipse.xsd.XSDElementDeclaration[] getResolvedProperties(CapabilityDefinition definition,
                                                                            org.eclipse.xsd.XSDElementDeclaration resourcePropertyElement)
Returns the properties resolved from resourcePropertyElement.


getInstancesOfProperty

public static int getInstancesOfProperty(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability model,
                                         java.lang.String propName)
Returns the instances of property of the given name.


getInstancesOfOperation

public static int getInstancesOfOperation(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability model,
                                          java.lang.String opName)
Returns the instances of operation of the given name.


getInstancesOfParameter

public static int getInstancesOfParameter(CapabilityDefinition capabilityDefinition,
                                          javax.wsdl.Operation operation,
                                          java.lang.String paramName)
Returns the instances of parameter of the given name.


validateJavaIdentifier

public static java.lang.String validateJavaIdentifier(java.lang.String name)
Validate whether given string is valid identifier or not NOTE : Fix for defect [#47609] Validation needed on text fields in editors


getProperty

public static org.eclipse.tptp.wsdm.tooling.model.capabilities.Property getProperty(org.eclipse.tptp.wsdm.tooling.model.capabilities.Capability capability,
                                                                                    java.lang.String namespace,
                                                                                    java.lang.String propertyName)
Returns the property of the given name.


getName

public static java.lang.String getName(org.eclipse.tptp.wsdm.tooling.model.capabilities.Property property)
Returns the name of the property.


isOperationNameConflicted

public static boolean isOperationNameConflicted(java.lang.String operationName)
Returns true if given operation name conflicted with super java capability implementation classes. Note : Fix for defect 167792 "Operations from abstract capability classes need to be identified" http://bugs.eclipse.org/bugs/show_bug.cgi?id=167792


createDocument

public static org.w3c.dom.Document createDocument(org.xml.sax.InputSource source)
                                           throws java.io.IOException,
                                                  org.xml.sax.SAXException
Creates DOM document from InputSource.

Throws:
java.io.IOException
org.xml.sax.SAXException

createDocument

public static org.w3c.dom.Document createDocument(java.io.InputStream stream)
                                           throws java.io.IOException,
                                                  org.xml.sax.SAXException
Creates DOM document from InputStream.

Throws:
java.io.IOException
org.xml.sax.SAXException

createDocument

public static org.w3c.dom.Document createDocument(java.lang.String xml)
                                           throws java.io.IOException,
                                                  org.xml.sax.SAXException
Creates DOM document from XML String.

Throws:
java.io.IOException
org.xml.sax.SAXException

TPTP 4.4.0 Monitoring Tools Project
Internal API Specification