Codota Logo
StringUtils
Code IndexAdd Codota to your IDE (free)

How to use
StringUtils
in
org.objectweb.celtix.common.util

Best Java code snippets using org.objectweb.celtix.common.util.StringUtils (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.objectweb.celtix/celtix-rt

private static boolean isSame(QName messageQName, QName methodQName) {
  boolean same = false;
  if (StringUtils.isEmpty(messageQName.getNamespaceURI())) {
    same = messageQName.getLocalPart().equals(methodQName.getLocalPart());
  } else {
    same = messageQName.equals(methodQName);
  }
  return same;
}
origin: org.objectweb.celtix/celtix-common

public static boolean isFileAbsolute(String file) {
  return isFileExist(file) && new File(file).isAbsolute();
}
origin: org.objectweb.celtix/celtix-tools

private String getNodeName(String expression) {
  return StringUtils.extract(expression, "[@name='", "']");
}
origin: org.objectweb.celtix/celtix-tools

private boolean isValidJaxwsBindingFile(String bindingLocation, XMLStreamReader reader) {
  try {
    if (ToolConstants.JAXWS_BINDINGS.equals(reader.getName())) {
      String wsdlURL = (String)env.get(ToolConstants.CFG_WSDLURL);
      wsdlURL = ProcessorUtil.absolutize(ProcessorUtil.getFileOrURLName(wsdlURL));
      String wsdlLocation = reader.getAttributeValue(null, "wsdlLocation");
      if (StringUtils.isFileExist(bindingLocation) && !StringUtils.isFileAbsolute(wsdlLocation)) {
        String basedir = new File(bindingLocation).getParent();
        wsdlLocation = new File(basedir, wsdlLocation).getAbsolutePath();
      }
      wsdlLocation = ProcessorUtil.absolutize(ProcessorUtil.getFileOrURLName(wsdlLocation));
        
      if (!StringUtils.getURL(wsdlURL).equals(StringUtils.getURL(wsdlLocation))) {
        Message msg = new Message("NOT_POINTTO_URL", LOG, new Object[]{wsdlLocation, wsdlURL});
        throw new ToolException(msg);
      }
    } else {
      return false;
    }
  } catch (MalformedURLException e) {
    Message msg = new Message("CAN_NOT_GET_WSDL_LOCATION", LOG);
    throw new ToolException(msg, e);
  }
  return true;
}
 
origin: org.objectweb.celtix/celtix-tools

  private String wrapper(String nodeName) {
    return StringUtils.wrapper(nodeName, "[@name='", "']");
  }
}
origin: org.objectweb.celtix/celtix-tools

public void load(InputStream is, String delim) throws IOException {
  BufferedReader br = new BufferedReader(new InputStreamReader(is));
  String line = br.readLine();
  while (!StringUtils.isEmpty(line)) {
    StringTokenizer st = new StringTokenizer(line, delim);
    String key = null;
    String value = null;
    if (st.hasMoreTokens()) {
      key  = st.nextToken().trim();
    }
    if (st.hasMoreTokens()) {
      value = st.nextToken().trim();
    }
    maps.put(key, value);
    line = br.readLine();
  }
  br.close();
}
 
origin: org.objectweb.celtix/celtix-tools

private void customizeSchema(Element schema, String targetNamespace) {
  String userPackage = env.mapPackageName(targetNamespace);
  if (env.hasExcludeNamespace(targetNamespace) && env.getExcludePackageName(targetNamespace) != null) {
    // generate excluded namespace types classes with specified package
    // name
    userPackage = env.getExcludePackageName(targetNamespace);
  }
  if (!isSchemaParsed(targetNamespace) && !StringUtils.isEmpty(userPackage)) {
    Node jaxbBindings = JAXBUtils.innerJaxbPackageBinding(schema, userPackage);
    schema.appendChild(jaxbBindings);
  }
  int nodeListLen = schema.getElementsByTagNameNS(ToolConstants.SCHEMA_URI, "import").getLength();
  for (int i = 0; i < nodeListLen; i++) {
    removeImportElement(schema);
  }
}
origin: org.objectweb.celtix/celtix-tools

private void addWebMethodAnnotation(JavaMethod method, String operationName) {
  JavaAnnotation methodAnnotation = new JavaAnnotation("WebMethod");
  methodAnnotation.addArgument("operationName", operationName);
  if (!StringUtils.isEmpty(method.getSoapAction())) {
    methodAnnotation.addArgument("action", method.getSoapAction());
  }
  method.addAnnotation("WebMethod", methodAnnotation);
  method.getInterface().addImport("javax.jws.WebMethod");
}

origin: org.objectweb.celtix/celtix-tools

public boolean isValid() throws ToolException {
  boolean isValid = true;
  String schemaDir = getSchemaDir();
  if (!StringUtils.isEmpty(schemaDir)) {
origin: org.objectweb.celtix/celtix-tools

if (StringUtils.isEmpty(targetNamespace)) {
  continue;
org.objectweb.celtix.common.utilStringUtils

Most used methods

  • isEmpty
  • isFileExist
  • extract
  • getURL
  • isFileAbsolute
  • wrapper

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now