Java 8 DatatypeConfigurationException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DatatypeConfigurationException class.

This code example shows how to use the following methods:getMessage
	@Override 
	public void loadWorkspaceData(Element workspaceData) { 
		try { 
			task.importValidationWorkspace(workspaceData);
		} catch (DatatypeConfigurationException e) {
			logger.error("Error exporting the workspace: " + e.getMessage(), e);
		} 
		notifyServiceListeners(); 
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	@Override 
	public boolean isValidated() { 
		return validationExecuted;
	} 
 
	/** 
	 * {@inheritDoc} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage, printStackTrace
            else { 
                System.out.println("Very good: " + xgc +  " is equal to " + xgcCopy);
            } 
        } 
        catch (DatatypeConfigurationException dce) {
            System.err.println("error: Datatype error occurred - " + dce.getMessage());
            dce.printStackTrace(System.err);
        } 
    } // main(String[]) 
     
} // DatatypeAPIUsage 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
This code example shows how to use the following methods:getMessage, printStackTrace
            else { 
                System.out.println("Very good: " + xgc +  " is equal to " + xgcCopy);
            } 
        } 
        catch (DatatypeConfigurationException dce) {
            System.err.println("error: Datatype error occurred - " + dce.getMessage());
            dce.printStackTrace(System.err);
        } 
    } // main(String[]) 
     
} // DatatypeAPIUsage 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
    private static DatatypeFactory datatypeFactory;
    static { 
        try { 
            datatypeFactory = DatatypeFactory.newInstance();
        } catch( DatatypeConfigurationException e ) {
            throw new IllegalStateException("Unable to instantiate " + DatatypeFactory.class.getName() + ": " + e.getMessage(), e);
        } 
    } 
 
    public static Date convertXmlGregCalToDate( XMLGregorianCalendar xmlCal ) {
        if( xmlCal == null ) {
            return null; 
        } 
        return xmlCal.toGregorianCalendar().getTime();
    } 
 
    public static XMLGregorianCalendar convertDateToXmlGregorianCalendar( Date date ) {
        if( date != null ) {
            GregorianCalendar gregorianCal = new GregorianCalendar();
            gregorianCal.setTime(date);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
	     calendar.get(Calendar.SECOND),
	     calendar.get(Calendar.MILLISECOND),
	     calendar.get(Calendar.ZONE_OFFSET)/(1000*60));
	     
	  } catch (DatatypeConfigurationException e) {
	   e.printStackTrace();
	   return null; 
	  } 
	 } 
	 // 锟斤拷取锟斤拷锟斤拷时锟斤拷 
	 public static java.sql.Timestamp getNowTime(String dateformat) {
	  Date now = new Date();
	  SimpleDateFormat dateFormat = new SimpleDateFormat(dateformat);// 锟斤拷锟皆凤拷锟斤拷锟斤拷薷锟斤拷锟斤拷诟锟绞�
	  String dateString = dateFormat.format(now);
	  SimpleDateFormat sd = new SimpleDateFormat(dateformat);
	  Date dateFormt = sd.parse(dateString, new java.text.ParsePosition(0));
	  java.sql.Timestamp dateTime = new java.sql.Timestamp(dateFormt
	    .getTime());
	  return dateTime;
	  // return hehe; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
 
        DatatypeFactory fact = null;
        try { 
            fact = DatatypeFactory.newInstance();
        } catch(DatatypeConfigurationException ce) {
            ce.printStackTrace();
        } 
        XML_DATE = fact;
    } 
 
    public static synchronized Date fromString(String str) {
        // "2007-07-25T09:26:24{Z|{+|-}01:00}" 
        if (checkLayout(str, "xxxx-xx-xxTxx:xx:xxZ") ||
                checkLayout(str, "xxxx-xx-xxTxx:xx:xx") ||
                checkLayout(str, "xxxx-xx-xxTxx:xx:xx+xx:00") ||
                checkLayout(str, "xxxx-xx-xxTxx:xx:xx-xx:00")) {
            calendar.set(
                parsePart(str, 0, 4),
                parsePart(str, 5, 2)-1,
                parsePart(str, 8, 2),
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		order.setCustomer(prepareCustomer());
		try { 
			order.setDateSubmitted(prepareDate(2010, 10, 15, 8, 00, 00));
			order.setOrderDate(prepareDate(2010, 10, 15, 12, 00, 00));
		} catch (DatatypeConfigurationException e) {
			e.printStackTrace();
		} 
		order.getItems().addAll(prepareOrderItems());
		return order;
	} 
 
	private List<FoodItem> prepareOrderItems() {
		List<FoodItem> items = new ArrayList<FoodItem>(5);
		items.add(prepareFoodItem("Vegetable Thali",
 
		FoodItemType.MEALS, 2)); 
		items.add(prepareFoodItem("Kheer/ Palpayasam",
 
		FoodItemType.DESSERTS, 4)); 
		items.add(prepareFoodItem("Fresh Orange Juice",
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
		DatatypeFactory df = null;
		 
		try { 
			df = DatatypeFactory.newInstance();
		} catch (DatatypeConfigurationException e) {
			e.printStackTrace();
		} 
		 
		timeTypes.setDuration(df.newDuration(9000L));
		timeTypes.setTime(df.newXMLGregorianCalendar(new GregorianCalendar(Locale.getDefault())));
		 
		DateFormat dateFormat = new SimpleDateFormat();
		// + 7 days 
		timeTypes.setDateTime(dateFormat.format(new Date(System.currentTimeMillis() + 1000 * 3600 * 24 * 7)));
		 
		 
		return timeTypes;
	} 
 
	private DateTypes createDateTypes(ObjectFactory dateTimeFactory) {
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
			ProcedureExecutionParent procedureExecutionParent) throws TranslatorException {
		this.parent = procedureExecutionParent;
		try { 
			factory = DatatypeFactory.newInstance();
		} catch (DatatypeConfigurationException e) {
			throw new TranslatorException(e.getMessage());
		} 
	} 
 
	@Override 
	public void cancel() { 
		// nothing to do here 
		 
	} 
 
	@Override 
	public void close() { 
		// nothing to do here 
		 
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 DatatypeConfigurationException Methods: