本文整理汇总了Java中gov.nih.nci.cagrid.common.Utils.decodeUrl方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.decodeUrl方法的具体用法?Java Utils.decodeUrl怎么用?Java Utils.decodeUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nih.nci.cagrid.common.Utils
的用法示例。
在下文中一共展示了Utils.decodeUrl方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
protected void setUp() throws Exception {
super.setUp();
baseDirectory = System.getProperty("basedir");
if (baseDirectory == null) {
System.err.println("basedir system property not set");
throw new Exception("basedir system property not set");
}
InputStream descriptorStream = this.getClass().getResourceAsStream(
"/gold/versions/introduceServicesExample.xml");
ServiceDescription introService = (ServiceDescription) Utils.deserializeObject(new InputStreamReader(
descriptorStream), ServiceDescription.class);
descriptorStream.close();
InputStream servicePropertiesStream = this.getClass().getResourceAsStream(
"/gold/versions/introduceServicesExample.properties");
Properties serviceProperties = new Properties();
serviceProperties.load(servicePropertiesStream);
servicePropertiesStream.close();
// have to set the service directory in the service properties
serviceProperties.setProperty(IntroduceConstants.INTRODUCE_SKELETON_DESTINATION_DIR, baseDirectory);
File serviceDir = new File(Utils.decodeUrl(this.getClass().getResource("/gold/versions")));
info = new ServiceInformation(introService, serviceProperties, serviceDir);
}
示例2: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci.getName() + "ClientGet.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
buildStep();
}
示例3: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a bookstore schema");
// copy over the bookstore schema to be used with the test
File schemaFile = new File(Utils.decodeUrl(this.getClass().getResource("/schema/bookstore.xsd")));
Utils.copyFile(schemaFile, new File(getBaseDir() + File.separator + tci.getDir() + File.separator + "schema"
+ File.separator + tci.getName() + File.separator + "bookstore.xsd"));
ServiceDescription introService = (ServiceDescription) Utils.deserializeDocument(getBaseDir() + File.separator
+ tci.getDir() + File.separator + "introduce.xml", ServiceDescription.class);
NamespaceType type = new NamespaceType();
type.setLocation("." + File.separator + "bookstore.xsd");
type.setNamespace("gme://projectmobius.org/1/BookStore");
type.setPackageName("projectmobius.org");
SchemaElementType etype = new SchemaElementType();
etype.setType("Book");
SchemaElementType[] etypeArr = new SchemaElementType[1];
etypeArr[0] = etype;
type.setSchemaElement(etypeArr);
CommonTools.addNamespace(introService, type);
Utils.serializeDocument(getBaseDir() + File.separator + tci.getDir() + File.separator + "introduce.xml",
introService, IntroduceConstants.INTRODUCE_SKELETON_QNAME);
try {
SyncTools sync = new SyncTools(new File(getBaseDir() + File.separator + tci.getDir()));
sync.sync();
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
buildStep();
}
示例4: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci.getName() + "ClientGetPersistentResource.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
buildStep();
}
示例5: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Validating WSDLs");
File wsdlSchema = new File(Utils.decodeUrl(this.getClass().getResource("/schema/wsdl.xsd")));
assertTrue("Unable to locate WSDL XSD", wsdlSchema.exists() && wsdlSchema.canRead());
File schemaDir = new File(getBaseDir() + File.separator + tci.getDir() + File.separator + "schema"
+ File.separator + tci.getName());
File[] wsdlFiles = schemaDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".wsdl");
}
});
// be sure we found at least one wsdl file
assertTrue(wsdlFiles.length > 0);
SchemaValidator validator = new SchemaValidator(wsdlSchema.toURI().toString());
for (File wsdl : wsdlFiles) {
try {
System.out.println("Validating WSDL:"+wsdl);
validator.validate(wsdl);
} catch (SchemaValidationException e) {
e.printStackTrace();
fail("Schema validation for (" + wsdl + ") failed:" + e.getMessage());
}
}
}
示例6: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistentnotification/" + tci.getName() + "GetClient.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
buildStep();
}
示例7: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/security/" + "SecurityTestsClient.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "client" + File.separator + tci.getName() + "Client.java");
SourceUtils.modifyImpl(inFileClient, outFileClient, "main");
File inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/security/" + "SecurityTestsImpl.java")));
File outFileImpl = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "service" + File.separator + tci.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "anonPrefered");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "anonNotPrefered");
buildStep();
}
示例8: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding metadata.");
ServiceDescription introService = (ServiceDescription) Utils.deserializeDocument(getBaseDir() + File.separator
+ tci.getDir() + File.separator + "introduce.xml", ServiceDescription.class);
// copy over the bookstore schema to be used with the test
File schemaFile = new File(Utils.decodeUrl(this.getClass().getResource("/schema/caDSRMetadata.xsd")));
Utils.copyFile(schemaFile, new File(getBaseDir() + File.separator + tci.getDir() + File.separator + "schema"
+ File.separator + tci.getName() + File.separator + "caDSRMetadata.xsd"));
int currentLength = 0;
NamespacesType namespaces = introService.getNamespaces();
if (namespaces.getNamespace() != null) {
currentLength = namespaces.getNamespace().length;
}
NamespaceType[] newNamespaceTypes = new NamespaceType[currentLength + 1];
if (currentLength > 0) {
System.arraycopy(namespaces.getNamespace(), 0, newNamespaceTypes, 0, currentLength);
}
NamespaceType type = new NamespaceType();
type.setLocation("./" + "caDSRMetadata.xsd");
type.setNamespace("gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.cadsr");
type.setPackageName("gov.nih.nci.cagrid.metadata.cadsr");
SchemaElementType etype = new SchemaElementType();
etype.setType("caDSRMetadata");
SchemaElementType[] etypeArr = new SchemaElementType[1];
etypeArr[0] = etype;
type.setSchemaElement(etypeArr);
newNamespaceTypes[currentLength] = type;
namespaces.setNamespace(newNamespaceTypes);
ResourcePropertiesListType metadatasType = CommonTools.getService(introService.getServices(),tci.getName()).getResourcePropertiesList();
ResourcePropertyType metadata = new ResourcePropertyType();
metadata.setPopulateFromFile(false);
metadata.setRegister(true);
metadata.setQName(new QName("gme://caGrid.caBIG/1.0/gov.nih.nci.cagrid.metadata.cadsr", "caDSRMetadata"));
// add new metadata to array in bean
// this seems to be a wierd way be adding things....
ResourcePropertyType[] newMetadatas;
int newLength = 0;
if (metadatasType !=null && metadatasType.getResourceProperty() != null) {
newLength = metadatasType.getResourceProperty().length + 1;
newMetadatas = new ResourcePropertyType[newLength];
System.arraycopy(metadatasType.getResourceProperty(), 0, newMetadatas, 0, metadatasType.getResourceProperty().length);
} else {
newLength = 1;
newMetadatas = new ResourcePropertyType[newLength];
}
ResourcePropertiesListType rplist = new ResourcePropertiesListType();
newMetadatas[newLength - 1] = metadata;
rplist.setResourceProperty(newMetadatas);
introService.getServices().getService(0).setResourcePropertiesList(rplist);
Utils.serializeDocument(getBaseDir() + File.separator + tci.getDir() + File.separator + "introduce.xml",
introService, IntroduceConstants.INTRODUCE_SKELETON_QNAME);
try {
SyncTools sync = new SyncTools(new File(getBaseDir() + File.separator + tci.getDir()));
sync.sync();
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
// look at the interface to make sure method from file does not
// exists.......
String serviceInterface = getBaseDir() + File.separator + tci.getDir() + File.separator + "src" + File.separator
+ tci.getPackageDir() + File.separator + "service" + File.separator + "globus" + File.separator + "resource"
+ File.separator + tci.getName() + "ResourceBase.java";
assertFalse("Checking that BaseResource contains the load method", StepTools.methodExists(serviceInterface,
"loadAnalyticalServiceMetadataFromFile"));
buildStep();
}
示例9: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/notification/" + tci.getName() + "Client.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
File inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/notification/"+ tci.getName() + "Impl.java")));
File outFileImpl = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "service" + File.separator + tci.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "setBook");
buildStep();
}
示例10: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci.getName() + "ClientSetPersistentResource.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
File inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci2.getName() + "Impl.java")));
File outFileImpl = new File(tci2.getDir() + File.separator + "src" + File.separator + tci2.getPackageDir() + File.separator + "service" + File.separator + tci2.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "setBook");
inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci2.getName() + "Impl.java")));
outFileImpl = new File(tci2.getDir() + File.separator + "src" + File.separator + tci2.getPackageDir() + File.separator + "service" + File.separator + tci2.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "getBook");
buildStep();
}
示例11: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci.getName() + "ClientSet.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
File inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci.getName() + "Impl.java")));
File outFileImpl = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "service" + File.separator + tci.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "setBook");
inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistence/" + tci.getName() + "Impl.java")));
outFileImpl = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "service" + File.separator + tci.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "getBook");
buildStep();
}
示例12: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistentnotification/" + tci.getName() + "SetClient.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir()
+ File.separator + "client" + File.separator + tci.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistentnotification/" + tci2.getName() + "Client.java")));
outFileClient = new File(tci2.getDir() + File.separator + "src" + File.separator + tci2.getPackageDir()
+ File.separator + "client" + File.separator + tci2.getName() + "Client.java");
Utils.copyFile(inFileClient, outFileClient);
File inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistentnotification/" + tci2.getName() + "Impl.java")));
File outFileImpl = new File(tci2.getDir() + File.separator + "src" + File.separator + tci2.getPackageDir() + File.separator + "service" + File.separator + tci2.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "setBook");
inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/persistentnotification/" + tci2.getName() + "Impl.java")));
outFileImpl = new File(tci2.getDir() + File.separator + "src" + File.separator + tci2.getPackageDir() + File.separator + "service" + File.separator + tci2.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, "getBook");
buildStep();
}
示例13: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/simple/" + "SimpleMethodClient.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "client" + File.separator + tci.getName() + "Client.java");
SourceUtils.modifyImpl(inFileClient, outFileClient, "main");
File inFileImpl = new File(Utils.decodeUrl(this.getClass().getResource("/gold/simple/" + "SimpleMethodImpl.java")));
File outFileImpl = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "service" + File.separator + tci.getName() + "Impl.java");
SourceUtils.modifyImpl(inFileImpl, outFileImpl, methodName);
buildStep();
}
示例14: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void runStep() throws Throwable {
System.out.println("Adding a simple methods implementation.");
File inFileClient = new File(Utils.decodeUrl(this.getClass().getResource("/gold/simple/" + "SimpleMethodClientRemoval.java")));
File outFileClient = new File(tci.getDir() + File.separator + "src" + File.separator + tci.getPackageDir() + File.separator + "client" + File.separator + tci.getName() + "Client.java");
SourceUtils.modifyImpl(inFileClient, outFileClient, "main");
buildStep();
}