|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nci.cagrid.introduce.common.CommonTools
public final class CommonTools
| Field Summary | |
|---|---|
static java.lang.String |
ALLOWED_EXISTING_JAVA_PACKAGE_REGEX
|
static java.lang.String |
ALLOWED_JAVA_CLASS_REGEX
|
static java.lang.String |
ALLOWED_JAVA_FIELD_REGEX
|
static java.lang.String |
ALLOWED_JAVA_OP_NAME
|
static java.lang.String |
ALLOWED_JAVA_PACKAGE_REGEX
|
static java.util.List |
JAVA_KEYWORDS
|
static java.lang.String |
SUGGESTED_JAVA_PACKAGE_REGEX
|
| Method Summary | |
|---|---|
static void |
addMethod(ServiceType service,
MethodType method)
Adds a method to a service |
static void |
addNamespace(ServiceDescription serviceD,
NamespaceType nsType)
Adds a namespace type to a service description |
static void |
addResourcePropety(ServiceType service,
ResourcePropertyType resource)
Adds a resource property to a service |
static void |
addService(ServicesType servicesType,
ServiceType serviceType)
Adds aservice type to the services list |
static void |
addServicePropety(ServiceDescription introService,
ServicePropertiesProperty property)
|
static java.lang.Process |
createAndOutputProcess(java.lang.String cmd)
|
static NamespaceType |
createNamespaceType(java.lang.String xsdFilename,
java.io.File serviceSchemaDir)
This method will create a namespaceType fully populated with the schema elements. |
static boolean |
equals(ServiceSecurity ss,
MethodSecurity ms)
|
static java.io.File |
findSchema(java.lang.String schemaNamespace,
java.io.File dir)
|
static java.lang.String |
getGlobusLocation()
|
static MethodType |
getMethod(MethodsType methods,
java.lang.String name)
Gets a method by its name |
static NamespaceType |
getNamespaceType(NamespacesType namespacesType,
java.lang.String namespaceURI)
|
static java.lang.String |
getPackageDir(ServiceType service)
Gets the directory which corresponds to a Java package name |
static java.lang.String |
getPackageName(java.lang.String fullNamespace)
Gets a package name for a namespace using a namespace to package mapper utility |
static java.lang.String |
getPackageName(java.lang.String fullNamespace,
NamespacesType namespaceTypes)
Gets a package name for a namespace |
static java.util.List |
getProvidedNamespaces(java.io.File startDir)
|
static ResourcePropertyType[] |
getResourcePropertiesOfType(ServiceType service,
javax.xml.namespace.QName type)
Gets all resource properties from a service which have a specified QName |
static java.lang.String |
getResourcePropertyVariableName(ResourcePropertiesListType metadataList,
int index)
Define a unique name for use as a variable for the metadata at the specified index given the scope of the ServiceMetadataListType. |
static SchemaElementType |
getSchemaElementType(NamespaceType nsType,
java.lang.String name)
|
static SchemaInformation |
getSchemaInformation(NamespacesType namespacesType,
javax.xml.namespace.QName qname)
|
static ServiceType |
getService(ServicesType services,
java.lang.String name)
Gets a service by name from the services container type |
static java.lang.String |
getServicePropertyValue(ServiceDescription desc,
java.lang.String key)
Gets the value of a service property from service information |
static java.lang.String |
getTargetNamespace(java.io.File file)
|
static void |
getTargetNamespaces(java.util.List namespaces,
java.io.File dir)
|
static java.util.Set |
getUnavailableUsedTypes(ServiceDescription desc)
Gets the types from a service description which are referenced in the service but not available in the namespace types of it |
static void |
importMethod(MethodTypeImportInformation importInformation,
java.io.File fromDir,
java.io.File toDir,
java.lang.String fromService,
java.lang.String toService,
java.lang.String methodName,
boolean copyFiles)
|
static boolean |
isNamespaceTypeInUse(NamespaceType nsType,
ServiceDescription desc)
Determines if schema element types from a namespace type are referenced in other parts of the service (e.g. |
static boolean |
isSuggestedPackageName(java.lang.String packageName)
|
static boolean |
isValidClassName(java.lang.String classname)
|
static boolean |
isValidJavaField(java.lang.String serviceName)
|
static boolean |
isValidJavaMethod(java.lang.String methodName)
|
static boolean |
isValidNoStubPackageName(java.lang.String packageName)
|
static boolean |
isValidPackageAndClassName(java.lang.String packageclass)
|
static boolean |
isValidPackageName(java.lang.String packageName)
|
static boolean |
isValidServiceName(java.lang.String serviceName)
|
static java.lang.String |
lowerCaseFirstCharacter(java.lang.String variableName)
Returns the input string with the first character converted to lower case |
static java.lang.String |
methodTypeToString(MethodType method)
|
static NamespaceType |
reCreateNamespaceType(java.lang.String xsdFilename,
java.io.File serviceSchemaDir,
NamespaceType oldType)
This method will create a namespaceType fully populated with the schema elements. |
static void |
removeMethod(MethodsType methodsType,
MethodType method)
Removes a method from a MethodsType container object |
static void |
removeNamespace(ServiceDescription serviceD,
java.lang.String namespace)
|
static void |
removeResourceProperty(ServiceType service,
javax.xml.namespace.QName resourcePropertyType)
|
static boolean |
removeServiceProperty(ServiceDescription desc,
java.lang.String key)
Removes a service property from service information |
static boolean |
servicePropertyExists(ServiceDescription desc,
java.lang.String key)
Determines if a service information object contains the specified service property |
static void |
setServiceProperty(ServiceDescription desc,
java.lang.String key,
java.lang.String value,
boolean isFromETC)
Sets a service property on the service information. |
static void |
setServiceProperty(ServiceDescription desc,
java.lang.String key,
java.lang.String value,
boolean isFromETC,
java.lang.String description)
Sets a service property on the service information. |
static java.lang.String |
upperCaseFirstCharacter(java.lang.String variableName)
Returns the input string with the first character converted to uppercase |
static boolean |
usedTypesAvailable(ServiceDescription desc)
Determines if all schema element types used in the service are still available in the service's namespace types. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ALLOWED_JAVA_CLASS_REGEX
public static final java.lang.String ALLOWED_JAVA_FIELD_REGEX
public static final java.lang.String ALLOWED_JAVA_OP_NAME
public static final java.lang.String ALLOWED_JAVA_PACKAGE_REGEX
public static final java.lang.String SUGGESTED_JAVA_PACKAGE_REGEX
public static final java.lang.String ALLOWED_EXISTING_JAVA_PACKAGE_REGEX
public static final java.util.List JAVA_KEYWORDS
| Method Detail |
|---|
public static java.lang.Process createAndOutputProcess(java.lang.String cmd)
throws java.lang.Exception
java.lang.Exceptionpublic static java.util.List getProvidedNamespaces(java.io.File startDir)
public static java.io.File findSchema(java.lang.String schemaNamespace,
java.io.File dir)
public static void getTargetNamespaces(java.util.List namespaces,
java.io.File dir)
public static java.lang.String getTargetNamespace(java.io.File file)
throws java.lang.Exception
java.lang.Exceptionpublic static boolean isValidPackageAndClassName(java.lang.String packageclass)
public static boolean isValidPackageName(java.lang.String packageName)
public static boolean isSuggestedPackageName(java.lang.String packageName)
public static boolean isValidNoStubPackageName(java.lang.String packageName)
public static boolean isValidServiceName(java.lang.String serviceName)
public static boolean isValidClassName(java.lang.String classname)
public static boolean isValidJavaField(java.lang.String serviceName)
public static boolean isValidJavaMethod(java.lang.String methodName)
public static java.lang.String getPackageName(java.lang.String fullNamespace)
fullNamespace - The namespace to derive a package name for
public static java.lang.String getPackageName(java.lang.String fullNamespace,
NamespacesType namespaceTypes)
fullNamespace - The namespace to get a package name fornamespaceTypes - The namespace types of a service
public static boolean equals(ServiceSecurity ss,
MethodSecurity ms)
public static NamespaceType createNamespaceType(java.lang.String xsdFilename,
java.io.File serviceSchemaDir)
throws java.lang.Exception
xsdFilename - The file name of the XSD schemaserviceSchemaDir - the directory where the service's schemas (wsdls) are
java.lang.Exception
public static NamespaceType reCreateNamespaceType(java.lang.String xsdFilename,
java.io.File serviceSchemaDir,
NamespaceType oldType)
throws java.lang.Exception
xsdFilename - The file name of the XSD schemaserviceSchemaDir - the directory where the service's schemas (wsdls) are
java.lang.Exception
public static SchemaElementType getSchemaElementType(NamespaceType nsType,
java.lang.String name)
public static ServiceType getService(ServicesType services,
java.lang.String name)
services - The services container typename - The name of the service
public static MethodType getMethod(MethodsType methods,
java.lang.String name)
methods - The methods container typename - The name of the method
public static java.lang.String methodTypeToString(MethodType method)
public static void importMethod(MethodTypeImportInformation importInformation,
java.io.File fromDir,
java.io.File toDir,
java.lang.String fromService,
java.lang.String toService,
java.lang.String methodName,
boolean copyFiles)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getPackageDir(ServiceType service)
service - The service
public static NamespaceType getNamespaceType(NamespacesType namespacesType,
java.lang.String namespaceURI)
public static SchemaInformation getSchemaInformation(NamespacesType namespacesType,
javax.xml.namespace.QName qname)
public static void addServicePropety(ServiceDescription introService,
ServicePropertiesProperty property)
public static void addResourcePropety(ServiceType service,
ResourcePropertyType resource)
service - The service to add a resource property toresource - The resource property to be added
public static void removeResourceProperty(ServiceType service,
javax.xml.namespace.QName resourcePropertyType)
public static ResourcePropertyType[] getResourcePropertiesOfType(ServiceType service,
javax.xml.namespace.QName type)
service - The service to find resource properties oftype - The type of resource properties to locate
public static void addMethod(ServiceType service,
MethodType method)
service - The service to add a new method tomethod - The method to be added
public static void removeMethod(MethodsType methodsType,
MethodType method)
methodsType - The container object to remove a method frommethod - The method to be removed
public static void addNamespace(ServiceDescription serviceD,
NamespaceType nsType)
serviceD - The service descriptionnsType - The namespace type to add
public static void removeNamespace(ServiceDescription serviceD,
java.lang.String namespace)
public static void addService(ServicesType servicesType,
ServiceType serviceType)
servicesType - The services descriptionsserviceType - The service type to add
public static java.lang.String getResourcePropertyVariableName(ResourcePropertiesListType metadataList,
int index)
metadataList - the list of metadataindex - the index into the metadata list of the targeted metadata item
public static void setServiceProperty(ServiceDescription desc,
java.lang.String key,
java.lang.String value,
boolean isFromETC)
desc - The service information to set a property onkey - The key of the service property to setvalue - The value to associate with the property key
public static void setServiceProperty(ServiceDescription desc,
java.lang.String key,
java.lang.String value,
boolean isFromETC,
java.lang.String description)
desc - The service information to set a property onkey - The key of the service property to setvalue - The value to associate with the property keydescription - The description of the service property
public static boolean servicePropertyExists(ServiceDescription desc,
java.lang.String key)
desc - The service descriptionkey - The property to check for
public static java.lang.String getServicePropertyValue(ServiceDescription desc,
java.lang.String key)
throws java.lang.Exception
desc - The service information to pull a property value fromkey - The key of the property value to find
java.lang.Exception - If no property with the specified key is found
public static boolean removeServiceProperty(ServiceDescription desc,
java.lang.String key)
desc - The service information to remove a property fromkey - The key name of the property to remove
public static boolean isNamespaceTypeInUse(NamespaceType nsType,
ServiceDescription desc)
nsType - desc -
public static boolean usedTypesAvailable(ServiceDescription desc)
desc -
public static java.util.Set getUnavailableUsedTypes(ServiceDescription desc)
desc - The service description
public static java.lang.String lowerCaseFirstCharacter(java.lang.String variableName)
variableName - string to fix
public static java.lang.String upperCaseFirstCharacter(java.lang.String variableName)
variableName - string to fix
public static java.lang.String getGlobusLocation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||