private S getTimeSet(Element element) { Object[] attributes = element.getAttributes(); if (GraphStoreConfiguration.ENABLE_ELEMENT_TIME_SET && GraphStoreConfiguration.ELEMENT_TIMESET_INDEX < attributes.length) { return (S) attributes[GraphStoreConfiguration.ELEMENT_TIMESET_INDEX]; } return null; }
private S getTimeSet(Element element) { Object[] attributes = element.getAttributes(); if (GraphStoreConfiguration.ENABLE_ELEMENT_TIME_SET && GraphStoreConfiguration.ELEMENT_TIMESET_INDEX < attributes.length) { return (S) attributes[GraphStoreConfiguration.ELEMENT_TIMESET_INDEX]; } return null; }
for (Object val : element.getAttributes()) { if (val != null && val instanceof TimeMap) { TimeMap dynamicValue = (TimeMap) val;
public void index(Element element) { S timeSet = getTimeSet(element); if (timeSet != null) { add(timeSet); } for (Object val : element.getAttributes()) { if (val != null && val instanceof TimeMap) { TimeMap dynamicValue = (TimeMap) val; add(dynamicValue); } } if (timeSet != null && mainIndex != null) { K[] ts = timeSet.toArray(); int tsLength = ts.length; for (int i = 0; i < tsLength; i++) { int timestampIndex = timeSortedMap.get(ts[i]); mainIndex.add(timestampIndex, element); } } }
for (Object val : element.getAttributes()) { if (val != null && val instanceof TimeMap) { TimeMap dynamicValue = (TimeMap) val;
public void index(Element element) { S timeSet = getTimeSet(element); if (timeSet != null) { add(timeSet); } for (Object val : element.getAttributes()) { if (val != null && val instanceof TimeMap) { TimeMap dynamicValue = (TimeMap) val; add(dynamicValue); } } if (timeSet != null && mainIndex != null) { K[] ts = timeSet.toArray(); int tsLength = ts.length; for (int i = 0; i < tsLength; i++) { int timestampIndex = timeSortedMap.get(ts[i]); mainIndex.add(timestampIndex, element); } } }
private void copyAttributes(TableImpl sourceTable, TableImpl destTable, Element element, Element elementCopy) { TimeRepresentation tr = sourceTable.store.configuration.getTimeRepresentation(); for (Column col : sourceTable.toArray()) { if (!col.isProperty()) { Column colCopy = destTable.getColumn(col.getId()); if (col.isDynamic() && tr.equals(TimeRepresentation.TIMESTAMP)) { for (Map.Entry<Double, Object> entry : element.getAttributes(col)) { Double key = entry.getKey(); Object value = entry.getValue(); elementCopy.setAttribute(colCopy, value, key); } } else if (col.isDynamic() && tr.equals(TimeRepresentation.INTERVAL)) { for (Map.Entry<Interval, Object> entry : element.getAttributes(col)) { Interval key = entry.getKey(); Object value = entry.getValue(); elementCopy.setAttribute(colCopy, value, key); } } else { Object attribute = element.getAttribute(col); elementCopy.setAttribute(colCopy, attribute); } } } }
private void copyAttributes(TableImpl sourceTable, TableImpl destTable, Element element, Element elementCopy) { TimeRepresentation tr = sourceTable.store.configuration.getTimeRepresentation(); for (Column col : sourceTable.toArray()) { if (!col.isProperty()) { Column colCopy = destTable.getColumn(col.getId()); if (col.isDynamic() && tr.equals(TimeRepresentation.TIMESTAMP)) { for (Map.Entry<Double, Object> entry : element.getAttributes(col)) { Double key = entry.getKey(); Object value = entry.getValue(); elementCopy.setAttribute(colCopy, value, key); } } else if (col.isDynamic() && tr.equals(TimeRepresentation.INTERVAL)) { for (Map.Entry<Interval, Object> entry : element.getAttributes(col)) { Interval key = entry.getKey(); Object value = entry.getValue(); elementCopy.setAttribute(colCopy, value, key); } } else { Object attribute = element.getAttribute(col); elementCopy.setAttribute(colCopy, attribute); } } } }