コード例 #1
0
 private void  InitBlock()
 {
     try
     {
         System.IO.Stream is_Renamed = ReferenceManager._().DeriveReference(referenceURI).Stream;
         return(LocalizationUtils.parseLocaleInput(is_Renamed));
     }
     catch (System.IO.IOException e)
     {
         if (e is org.javarosa.core.io.StreamsUtil.DirectionalIOException)
         {
             ((org.javarosa.core.io.StreamsUtil.DirectionalIOException)e).printStackTrace();
         }
         else
         {
             SupportClass.WriteStackTrace(e, Console.Error);
         }
         throw new System.SystemException("IOException while getting localized text at reference " + referenceURI);
     }
     catch (InvalidReferenceException e)
     {
         SupportClass.WriteStackTrace(e, Console.Error);
         throw new System.SystemException("Invalid Reference! " + referenceURI);
     }
 }
コード例 #2
0
 /* (non-Javadoc)
  * @see org.javarosa.core.services.locale.LocaleDataSource#getLocalizedText()
  */
 public OrderedHashtable getLocalizedText()
 {
     try
     {
         Stream is_renamed = ReferenceManager._().DeriveReference(referenceURI).Stream;
         return(LocalizationUtils.parseLocaleInput(is_renamed));
     }
     catch (IOException e)
     {
         Console.WriteLine(e.StackTrace);
         throw new SystemException("IOException while getting localized text at reference " + referenceURI);
     }
     catch (InvalidReferenceException e)
     {
         Console.WriteLine(e.StackTrace);
         throw new SystemException("Invalid Reference! " + referenceURI);
     }
 }
コード例 #3
0
 /* (non-Javadoc)
  * @see org.javarosa.core.reference.ReferenceFactory#derive(java.lang.String, java.lang.String)
  */
 public virtual Reference derive(System.String URI, System.String context)
 {
     System.String referenceURI = context.Substring(0, (context.LastIndexOf('/') + 1) - (0)) + URI;
     return(ReferenceManager._().DeriveReference(referenceURI));
 }
コード例 #4
0
ファイル: RootTranslator.cs プロジェクト: ryanbehr/csrosa
 /* (non-Javadoc)
  * @see org.commcare.reference.Root#derive(java.lang.String, java.lang.String)
  */
 public virtual Reference derive(System.String URI, System.String context)
 {
     return(ReferenceManager._().DeriveReference(URI, translatedPrefix + context.Substring(prefix.Length)));
 }
コード例 #5
0
ファイル: RootTranslator.cs プロジェクト: ryanbehr/csrosa
 /* (non-Javadoc)
  * @see org.commcare.reference.Root#derive(java.lang.String)
  */
 public virtual Reference derive(System.String URI)
 {
     return(ReferenceManager._().DeriveReference(translatedPrefix + URI.Substring(prefix.Length)));
 }