Examples of capabilities()


Examples of org.terrier.utility.io.FileSystem.capabilities()

  {
    path = transform(path);
        final FileSystem fs = getFileSystem(path);
        if (fs == null)
            return false;
        if ((fs.capabilities() & FSCapability.STAT) == 0)
            return false;
        try{
            return fs.isDirectory(path);
        } catch (IOException ioe) {
            return false;
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.capabilities()

  {
    path = transform(path);
        final FileSystem fs = getFileSystem(path);
        if (fs == null)
            return null;
        if ((fs.capabilities() & FSCapability.STAT) == 0)
            return null;
        try{
            return fs.getParent(path);
        } catch (IOException ioe) {
            return null;
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.capabilities()

  {
    path = transform(path);
        final FileSystem fs = getFileSystem(path);
        if (fs == null)
            return EMPTY_STRING_ARRAY;
        if ((fs.capabilities() & FSCapability.LS_DIR) == 0)
            return EMPTY_STRING_ARRAY;
        try{
            return fs.list(path);
        } catch (IOException ioe) {
            return EMPTY_STRING_ARRAY;
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.capabilities()

  {
    filename = transform(filename);
    final FileSystem fs = getFileSystem(filename);
    if (fs == null)
      throw new FileNotFoundException("No file system for "+filename);
    if ((fs.capabilities() & FSCapability.READ) == 0)
      throw new IOException("File system not supporting reads for "+ filename);
       
    InputStream rtr = fs.openFileStream(filename);
    for(Pattern regex : inputStreamMap.keySet())
    {
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.capabilities()

  {
    filename = transform(filename);
    final FileSystem fs = getFileSystem(filename);
    if (fs == null)
      throw new FileNotFoundException("No file system for "+filename);
    if ((fs.capabilities() & FSCapability.WRITE) == 0)
      throw new IOException("File system not supporting writes for "+ filename);
    OutputStream rtr = fs.writeFileStream(filename);
    for(Pattern regex : outputStreamMap.keySet())
    {
      if (regex.matcher(filename).matches())
View Full Code Here

Examples of org.terrier.utility.io.FileSystem.capabilities()

  {
    filename = transform(filename);
    final FileSystem fs = getFileSystem(filename);
    if (fs == null)
      throw new FileNotFoundException("No file system for "+filename);
    if ((fs.capabilities() & FSCapability.RANDOM_READ) == 0)
      throw new IOException("File system not supporting random reads for "+ filename);
    return fs.openFileRandom(filename);
  }

  /** Returns a RandomAccessFile implementation accessing the specificed file */
 
View Full Code Here

Examples of weka.core.Capabilities.capabilities()

    else
      result = getFilter().getCapabilities();

    // only nominal and numeric classes allowed
    classes = result.getClassCapabilities();
    iter = classes.capabilities();
    while (iter.hasNext()) {
      capab = (Capability) iter.next();
      if (    (capab != Capability.BINARY_CLASS)
     && (capab != Capability.NOMINAL_CLASS)
     && (capab != Capability.NUMERIC_CLASS)
View Full Code Here

Examples of weka.core.Capabilities.capabilities()

    result = getCapabilities();

    // no class? -> remove all class capabilites apart from NO_CLASS
    if (data.classIndex() == -1) {
      classes = result.getClassCapabilities();
      iter    = classes.capabilities();
      while (iter.hasNext()) {
  cap = (Capability) iter.next();
  if (cap != Capability.NO_CLASS) {
    result.disable(cap);
    result.disableDependency(cap);
View Full Code Here

Examples of weka.core.Capabilities.capabilities()

    result = getCapabilities();

    // no class? -> remove all class capabilites apart from NO_CLASS
    if (data.classIndex() == -1) {
      classes = result.getClassCapabilities();
      iter    = classes.capabilities();
      while (iter.hasNext()) {
  cap = (Capability) iter.next();
  if (cap != Capability.NO_CLASS) {
    result.disable(cap);
    result.disableDependency(cap);
View Full Code Here

Examples of weka.core.Capabilities.capabilities()

    else
      result = getFilter().getCapabilities();

    // only nominal and numeric classes allowed
    classes = result.getClassCapabilities();
    iter = classes.capabilities();
    while (iter.hasNext()) {
      capab = (Capability) iter.next();
      if (    (capab != Capability.BINARY_CLASS)
     && (capab != Capability.NOMINAL_CLASS)
     && (capab != Capability.NUMERIC_CLASS)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.