Package org.apache.uima.resource

Examples of org.apache.uima.resource.SharedResourceObject


    // We haven't encountered this before. See if we need to instantiate a
    // SharedResourceObject
    Class<?> sharedResourceObjectClass = mParameterizedResourceImplClassMap.get(aName);
    if (sharedResourceObjectClass != null) {
      try {
        SharedResourceObject sro = (SharedResourceObject) sharedResourceObjectClass.newInstance();
        sro.load(dr);
        mParameterizedResourceInstanceMap.put(nameAndResource, sro);
        return sro;
      } catch (InstantiationException e) {
        throw new ResourceAccessException(e);
      } catch (IllegalAccessException e) {
View Full Code Here


    // is this a DataResource?
    if (r instanceof DataResource) {
      // instantiate and load the resource object if there is one
      if (implClass != null) {
        try {
          SharedResourceObject sro = (SharedResourceObject) implClass.newInstance();
          if (!verificationMode) {
            sro.load((DataResource) r);
          }
          r = sro;
        } catch (InstantiationException e) {
          throw new ResourceInitializationException(
                  ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] {
View Full Code Here

    // We haven't encountered this before. See if we need to instantiate a
    // SharedResourceObject
    Class<?> sharedResourceObjectClass = mParameterizedResourceImplClassMap.get(aName);
    if (sharedResourceObjectClass != null) {
      try {
        SharedResourceObject sro = (SharedResourceObject) sharedResourceObjectClass.newInstance();
        sro.load(dr);
        mParameterizedResourceInstanceMap.put(nameAndResource, sro);
        return sro;
      } catch (InstantiationException e) {
        throw new ResourceAccessException(e);
      } catch (IllegalAccessException e) {
View Full Code Here

    // is this a DataResource?
    if (r instanceof DataResource) {
      // instantiate and load the resource object if there is one
      if (implClass != null) {
        try {
          SharedResourceObject sro = (SharedResourceObject) implClass.newInstance();
          if (!verificationMode) {
            sro.load((DataResource) r);
          }
          r = sro;
        } catch (InstantiationException e) {
          throw new ResourceInitializationException(
                  ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] {
View Full Code Here

    // We haven't encountered this before. See if we need to instantiate a
    // SharedResourceObject
    Class<?> sharedResourceObjectClass = mParameterizedResourceImplClassMap.get(aName);
    if (sharedResourceObjectClass != null) {
      try {
        SharedResourceObject sro = (SharedResourceObject) sharedResourceObjectClass.newInstance();
        sro.load(dr);
        mParameterizedResourceInstanceMap.put(nameAndResource, sro);
        return sro;
      } catch (InstantiationException e) {
        throw new ResourceAccessException(e);
      } catch (IllegalAccessException e) {
View Full Code Here

    // is this a DataResource?
    if (r instanceof DataResource) {
      // instantiate and load the resource object if there is one
      if (implClass != null) {
        try {
          SharedResourceObject sro = (SharedResourceObject) implClass.newInstance();
          if (!verificationMode) {
            sro.load((DataResource) r);
          }
          r = sro;
        } catch (InstantiationException e) {
          throw new ResourceInitializationException(
                  ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] {
View Full Code Here

    // We haven't encountered this before. See if we need to instantiate a
    // SharedResourceObject
    Class sharedResourceObjectClass = (Class) mParameterizedResourceImplClassMap.get(aName);
    if (sharedResourceObjectClass != null) {
      try {
        SharedResourceObject sro = (SharedResourceObject) sharedResourceObjectClass.newInstance();
        sro.load(dr);
        mParameterizedResourceInstanceMap.put(nameAndResource, sro);
        return sro;
      } catch (InstantiationException e) {
        throw new ResourceAccessException(e);
      } catch (IllegalAccessException e) {
View Full Code Here

    // is this a DataResource?
    if (r instanceof DataResource) {
      // instantiate and load the resource object if there is one
      if (implClass != null) {
        try {
          SharedResourceObject sro = (SharedResourceObject) implClass.newInstance();
          if (!verificationMode) {
            sro.load((DataResource) r);
          }
          r = sro;
        } catch (InstantiationException e) {
          throw new ResourceInitializationException(
                  ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] {
View Full Code Here

    // We haven't encountered this before. See if we need to instantiate a
    // SharedResourceObject
    Class sharedResourceObjectClass = (Class) mParameterizedResourceImplClassMap.get(aName);
    if (sharedResourceObjectClass != null) {
      try {
        SharedResourceObject sro = (SharedResourceObject) sharedResourceObjectClass.newInstance();
        sro.load(dr);
        mParameterizedResourceInstanceMap.put(nameAndResource, sro);
        return sro;
      } catch (InstantiationException e) {
        throw new ResourceAccessException(e);
      } catch (IllegalAccessException e) {
View Full Code Here

    // is this a DataResource?
    if (r instanceof DataResource) {
      // instantiate and load the resource object if there is one
      if (implClass != null) {
        try {
          SharedResourceObject sro = (SharedResourceObject) implClass.newInstance();
          sro.load((DataResource) r);
          r = sro;
        } catch (InstantiationException e) {
          throw new ResourceInitializationException(
                  ResourceInitializationException.COULD_NOT_INSTANTIATE, new Object[] {
                      implClass.getName(), aResourceDescription.getSourceUrlString() }, e);
View Full Code Here

TOP

Related Classes of org.apache.uima.resource.SharedResourceObject

Copyright © 2018 www.massapicom. 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.