本文整理汇总了Java中org.deckfour.xes.extension.XExtension类的典型用法代码示例。如果您正苦于以下问题:Java XExtension类的具体用法?Java XExtension怎么用?Java XExtension使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XExtension类属于org.deckfour.xes.extension包,在下文中一共展示了XExtension类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPredefinedXExtension
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public XExtension createPredefinedXExtension(String key){
if(key == null)
return null;
XExtension xext = null;
String keyLC = key.toLowerCase();
switch(keyLC){
case "time:timestamp":
xext = XTimeExtension.instance(); break;
case "concept:name":
xext = XConceptExtension.instance(); break;
case "lifecycle:transition":
xext = XLifecycleExtension.instance(); break;
case "org:resource":
xext = XOrganizationalExtension.instance(); break;
default: xext = null;
}
return xext;
}
示例2: init
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
private void init(){
this.globaTraceAtt = new ArrayList<XAttribute>();
this.globaEventAtt = new ArrayList<XAttribute>();
this.classifier = new ArrayList<XEventClassifier>();
this.defaultExtensionSet = new HashSet<XExtension>();
if(useOnPromDefaultMetaData)
addDefaultXLogProperties();
}
示例3: createXAttribute
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public XAttribute createXAttribute(String type, String key, String value, XExtension xext) throws UnsupportedAttributeTypeException {
if(type == null)
throw new UnsupportedAttributeTypeException(type, key, value);
if(key == null || value == null)
return null;
XAttribute att;
String typeLC = type.toLowerCase();
try{
switch(typeLC){
case "literal":
att = xfact.createAttributeLiteral(key, value, xext);
break;
case "timestamp":
/*
* Note: based on the the method "public static Timestamp valueOf(String s)" in "java.sql.Timestamp"
* we assume that the timestamp is in format yyyy-[m]m-[d]d hh:mm:ss[.f...].
* The fractional seconds may be omitted. The leading zero for mm and dd may also be omitted.
*/
att = xfact.createAttributeTimestamp(key, Timestamp.valueOf(value).getTime(), xext);
break;
default:
throw new UnsupportedAttributeTypeException(type, key, value);
}
}catch(IllegalArgumentException iae){
iae.printStackTrace();
return null;
}
return att;
}
示例4: getExtensions
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public Set<XExtension> getExtensions() {
if (attributes != null) {
return XAttributeUtils.extractExtensions(getAttributes());
} else {
return Collections.emptySet();
}
}
示例5: XLogImpl
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Creates a new log.
*
* @param attributeMap The attribute map used to store this
* log's attributes.
*/
public XLogImpl(XAttributeMap attributeMap) {
this.attributes = attributeMap;
this.extensions = new UnifiedSet<XExtension>();
this.classifiers = new ArrayList<XEventClassifier>();
this.globalTraceAttributes = new ArrayList<XAttribute>();
this.globalEventAttributes = new ArrayList<XAttribute>();
this.cachedClassifier = null;
this.cachedInfo = null;
}
示例6: XLogImpl
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Creates a new log.
*
* @param attributeMap The attribute map used to store this
* log's attributes.
*/
public XLogImpl(XAttributeMap attributeMap, int[] counter, IntObjectHashMap<XEvent> intToEvent, ObjectIntHashMap<XEvent> eventToInt) {
this.counter = counter;
this.intToEvent = intToEvent;
this.eventToInt = eventToInt;
this.attributes = attributeMap;
this.extensions = new UnifiedSet<XExtension>();
this.classifiers = new ArrayList<XEventClassifier>();
this.globalTraceAttributes = new ArrayList<XAttribute>();
this.globalEventAttributes = new ArrayList<XAttribute>();
this.cachedClassifier = null;
this.cachedInfo = null;
}
示例7: containsDataUsageExtension
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Checks if the extension list contains the {@link XExtension} with the name <i>AttributeDataUsage</i>.
*/
private boolean containsDataUsageExtension(XLog log) {
for (XExtension extension : log.getExtensions()) {
if (extension.getName().equals("AttributeDataUsage"))
return true;
}
return false;
}
示例8: XAttributeInfoImpl
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Creates a new attribute information registry.
*/
public XAttributeInfoImpl() {
keyMap = new HashMap<String, XAttribute>();
frequencies = new HashMap<String, Integer>();
typeMap = new HashMap<Class<? extends XAttribute>, Set<XAttribute>>();
extensionMap = new HashMap<XExtension, Set<XAttribute>>();
noExtensionSet = new HashSet<XAttribute>();
totalFrequency = 0;
}
示例9: getAttributesForExtension
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public Collection<XAttribute> getAttributesForExtension(XExtension extension) {
if(extension == null) {
return getAttributesWithoutExtension();
} else {
Set<XAttribute> extensionSet = extensionMap.get(extension);
if(extensionSet == null) {
extensionSet = new HashSet<XAttribute>(0);
}
return Collections.unmodifiableCollection(extensionSet);
}
}
示例10: getKeysForExtension
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public Collection<String> getKeysForExtension(XExtension extension) {
Collection<XAttribute> extensionCollection = getAttributesForExtension(extension);
Set<String> keySet = new HashSet<String>();
for(XAttribute attribute : extensionCollection) {
keySet.add(attribute.getKey());
}
return Collections.unmodifiableCollection(keySet);
}
示例11: XesXmlHandler
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Creates a new handler instance.
*/
public XesXmlHandler() {
log = null;
trace = null;
event = null;
attributeStack = new Stack<XAttribute>();
attributableStack = new Stack<XAttributable>();
extensions = new HashSet<XExtension>();
globals = null;
}
示例12: getExtensions
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public Set<XExtension> getExtensions() {
if (attributes != null) {
return XAttributeUtils.extractExtensions(getAttributes());
} else {
return Collections.emptySet();
}
}
示例13: XLogImpl
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Creates a new log.
*
* @param attributeMap The attribute map used to store this
* log's attributes.
*/
public XLogImpl(XAttributeMap attributeMap) {
this.attributes = attributeMap;
this.extensions = new HashSet<XExtension>();
this.classifiers = new ArrayList<XEventClassifier>();
this.globalTraceAttributes = new ArrayList<XAttribute>();
this.globalEventAttributes = new ArrayList<XAttribute>();
this.cachedClassifier = null;
this.cachedInfo = null;
}
示例14: unmarshal
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
String key = reader.getAttribute("key");
String type = reader.getAttribute("type");
String value = reader.getAttribute("value");
XExtension extension = null;
String extensionString = reader.getAttribute("extension");
if (extensionString != null && extensionString.length() > 0) {
URI uri = URI.create(extensionString);
extension = XExtensionManager.instance().getByUri(uri);
}
XFactory factory = XFactoryRegistry.instance().currentDefault();
XAttribute attribute = XAttributeUtils.composeAttribute(factory, key,
value, type, extension);
XAttribute parent = (XAttribute) context.get(PARENT);
if (parent != null && parent instanceof XAttributeCollection) {
((XAttributeCollection) parent).addToCollection(attribute);
}
System.err.println("8");
if (reader.hasMoreChildren()) {
System.err.println("9");
reader.moveDown();
Object oldParent = context.get(PARENT);
context.put(PARENT, attribute);
XAttributeMap metaAttributes = (XAttributeMap) context
.convertAnother(attribute, XAttributeMap.class,
XesXStreamPersistency.attributeMapConverter);
context.put(PARENT, oldParent);
reader.moveUp();
attribute.setAttributes(metaAttributes);
}
System.err.println("done");
return attribute;
}
示例15: extractExtensions
import org.deckfour.xes.extension.XExtension; //导入依赖的package包/类
/**
* Static helper method for extracting all extensions from an attribute map.
*
* @param attributeMap
* The attribute map from which to extract extensions.
* @return The set of extensions in the attribute map.
*/
public static Set<XExtension> extractExtensions(
Map<String, XAttribute> attributeMap) {
HashSet<XExtension> extensions = new HashSet<XExtension>();
for (XAttribute attribute : attributeMap.values()) {
XExtension extension = attribute.getExtension();
if (extension != null) {
extensions.add(extension);
}
}
return extensions;
}