org.relaxng.datatype.DatatypeLibrary Java Examples

The following examples show how to use org.relaxng.datatype.DatatypeLibrary. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SchemaBuilderImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #2
Source File: SchemaBuilderImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #3
Source File: SchemaBuilderImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #4
Source File: SchemaBuilderImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #5
Source File: SchemaBuilderImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #6
Source File: SchemaBuilderImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #7
Source File: SchemaBuilderImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example #8
Source File: DatatypeLibraryLoader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #9
Source File: BuiltinDatatypeLibraryFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #10
Source File: CachedDatatypeLibraryFactory.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #11
Source File: DatatypeLibraryLoader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #12
Source File: CachedDatatypeLibraryFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #13
Source File: BuiltinDatatypeLibraryFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #14
Source File: CachedDatatypeLibraryFactory.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #15
Source File: BuiltinDatatypeLibraryFactory.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #16
Source File: DatatypeLibraryLoader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #17
Source File: BuiltinDatatypeLibraryFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #18
Source File: CachedDatatypeLibraryFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #19
Source File: CachedDatatypeLibraryFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #20
Source File: DatatypeLibraryLoader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #21
Source File: BuiltinDatatypeLibraryFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #22
Source File: BuiltinDatatypeLibraryFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #23
Source File: CachedDatatypeLibraryFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #24
Source File: DatatypeLibraryLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #25
Source File: DatatypeLibraryLoader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #26
Source File: BuiltinDatatypeLibraryFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example #27
Source File: CachedDatatypeLibraryFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example #28
Source File: DatatypeLibraryLoader.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example #29
Source File: CascadingDatatypeLibraryFactory.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
    if(lib==null)
        lib = factory2.createDatatypeLibrary(namespaceURI);
    return lib;
}
 
Example #30
Source File: CascadingDatatypeLibraryFactory.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
    if(lib==null)
        lib = factory2.createDatatypeLibrary(namespaceURI);
    return lib;
}