public class OGFXMLRecordParser extends XMLRecordParser
Parser for OGF usage records. This parser is intended to parse documents based on document GFD.098 published by the Open Grid Forum (OGF). The document specifies an XML format for OGF usage records. This parser parses such XML documents and converts them into SAFE's internal format.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_PROPERTY_REGISTRY_NAME
Name of the registry used to store UR extensionProperties generated from
the config extensionProperties
|
static PropertyTag |
OGF_TEXT |
static PropertyTag<java.lang.Number> |
OGFUR_CHARGE_PROP |
static PropertyTag<java.lang.String> |
OGFUR_CHARGE_UNIT_PROP |
static PropertyTag<uk.ac.ed.epcc.webapp.model.data.Duration> |
OGFUR_CPU_DURATION_PROP |
static PropertyTag<java.util.Date> |
OGFUR_CREATE_TIME_PROP |
static PropertyRegistry |
OGFUR_DEFAULT_REGISTRY
The property registry that holds all the default property tags used by UR
extensionProperties.
|
static PropertyTag<java.util.Date> |
OGFUR_END_TIME_PROP |
static PropertyTag<java.lang.String> |
OGFUR_GLOBAL_JOB_ID_PROP |
static PropertyTag<java.lang.String> |
OGFUR_GLOBAL_USERNAME_PROP
There seems to be some confusion in OGF documents about the capitalisation
of this element as the document gives GlobalUsername but the xsd schema in
common use uses GlobalUserName.
|
static PropertyTag<java.lang.String> |
OGFUR_HOST_PROP |
static PropertyTag<java.lang.String> |
OGFUR_JOB_NAME_PROP |
static PropertyTag<java.lang.String> |
OGFUR_LOCAL_JOB_ID_PROP |
static PropertyTag<java.lang.String> |
OGFUR_LOCAL_USER_ID_PROP |
static PropertyTag<java.lang.String> |
OGFUR_MACHINE_NAME_PROP |
static PropertyTag<java.lang.Integer> |
OGFUR_NODE_COUNT_PROP |
static PropertyTag<java.lang.String> |
OGFUR_PROCESS_ID_PROP |
static PropertyTag<java.lang.Integer> |
OGFUR_PROCESSORS_PROP |
static PropertyTag<java.lang.String> |
OGFUR_PROJECT_NAME_PROP |
static PropertyTag<java.lang.String> |
OGFUR_QUEUE_PROP |
static PropertyTag<java.lang.String> |
OGFUR_RECORD_ID_PROP |
static PropertyTag<java.lang.String> |
OGFUR_RECORD_IDENTITY_PROP |
static PropertyTag<java.lang.String> |
OGFUR_SERVICE_LEVEL_PROP |
static PropertyTag<java.util.Date> |
OGFUR_START_TIME_PROP |
static PropertyTag<java.lang.String> |
OGFUR_STATUS_PROP |
static PropertyTag<java.lang.String> |
OGFUR_SUBJECT_NAME_PROP |
static PropertyTag<java.lang.String> |
OGFUR_SUBMIT_HOST_PROP |
static PropertyTag<uk.ac.ed.epcc.webapp.model.data.Duration> |
OGFUR_WALL_DURATION_PROP |
ACCOUNT_PROP, batch, BATCH_SCRIPT_PROP, CPU_WAIT_PROP, EXPECTED_FINISH, JOB_ID_PROP, JOB_NAME_PROP, NODE_COUNT_PROP, PARTITION_PROP, PROC_COUNT_PROP, QUEUE_PROP, REQUEST_ACCURACY_PROP, REQUESTED_CPUS_PROP, REQUESTED_WALLCLOCK_PROP, RESIDENCY_PROP, SERIAL_PROP, SLOWDOWN_PROP, SUBJOB_PROP, SUBMITTED_PROP, SUBMITTED_TIMESTAMP, SUCCESS_PROP, TIME_PROP, WAIT_PROP, WALLCLOCK_PROPDUPLICATE_KEY| Constructor and Description |
|---|
OGFXMLRecordParser(uk.ac.ed.epcc.webapp.AppContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> void |
ADD_DERIVATON(PropExpressionMap map,
PropertyTag<T> p1,
PropertyTag<T> p2)
Private method used to declare two
PropertyTags to be equal to
each other. |
protected java.lang.String |
defaultSchemaName()
Default Schema to use when none set via properties
|
PropExpressionMap |
getDerivedProperties(PropExpressionMap previous)
return a set of derived property definitions.
|
protected java.lang.String[] |
getTargets() |
protected PropertyFinder |
initFinder(uk.ac.ed.epcc.webapp.AppContext context,
PropertyFinder prev)
First stage of the initFinder process.
|
protected ParsernameSpaceContext |
makeNameSpaceContext()
This is used for namespace resolution
In particular for the Xpath expressions used by the parser.
|
uk.ac.ed.epcc.webapp.jdbc.table.TableSpecification |
modifyDefaultTableSpecification(uk.ac.ed.epcc.webapp.AppContext c,
uk.ac.ed.epcc.webapp.jdbc.table.TableSpecification initial,
java.lang.String table_name)
Modify the default table specification if appropriate
A null specification denotes that a table should not be auto-created.
|
endParse, getContext, getSplitter, initFinder, parse, postProcess, splitRecords, startParsereadDouble, readInteger, readLong, readTimegetDefaultUniqueProperties, uniqueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultUniquePropertiespublic static final java.lang.String DEFAULT_PROPERTY_REGISTRY_NAME
public static final PropertyRegistry OGFUR_DEFAULT_REGISTRY
@Path(value="//ur:RecordIdentity") public static final PropertyTag<java.lang.String> OGFUR_RECORD_IDENTITY_PROP
@Path(value="//ur:RecordIdentity/@ur:createTime") @OptionalTable public static final PropertyTag<java.util.Date> OGFUR_CREATE_TIME_PROP
@Path(value="//ur:RecordIdentity/@ur:recordId") @AutoTable(unique=true, length=128) public static final PropertyTag<java.lang.String> OGFUR_RECORD_ID_PROP
@Path(value="//ur:GlobalJobId") @AutoTable public static final PropertyTag<java.lang.String> OGFUR_GLOBAL_JOB_ID_PROP
@Path(value="//ur:LocalJobId") @AutoTable public static final PropertyTag<java.lang.String> OGFUR_LOCAL_JOB_ID_PROP
@Path(value="//ur:ProcessId") @OptionalTable(length=256) public static final PropertyTag<java.lang.String> OGFUR_PROCESS_ID_PROP
@Path(value="//ur:GlobalUserName|//ur:GlobalUsername") @AutoTable(length=512) public static final PropertyTag<java.lang.String> OGFUR_GLOBAL_USERNAME_PROP
@Path(value="//ur:LocalUserId") @AutoTable public static final PropertyTag<java.lang.String> OGFUR_LOCAL_USER_ID_PROP
@Path(value="//ur:UserIdentity/xd:KeyInfo/xd:X509Data/xd:X509SubjectName") @AutoTable(length=512) public static final PropertyTag<java.lang.String> OGFUR_SUBJECT_NAME_PROP
@Path(value="//ur:Charge") @OptionalTable public static final PropertyTag<java.lang.Number> OGFUR_CHARGE_PROP
@Path(value="//ur:Charge/@ur:unit") @OptionalTable public static final PropertyTag<java.lang.String> OGFUR_CHARGE_UNIT_PROP
@Path(value="//ur:EndTime") @AutoTable(unique=true) public static final PropertyTag<java.util.Date> OGFUR_END_TIME_PROP
@Path(value="//ur:Host") @OptionalTable(length=512) public static final PropertyTag<java.lang.String> OGFUR_HOST_PROP
@Path(value="//ur:JobName") @AutoTable(length=128) public static final PropertyTag<java.lang.String> OGFUR_JOB_NAME_PROP
@Path(value="//ur:MachineName") @OptionalTable(length=128) public static final PropertyTag<java.lang.String> OGFUR_MACHINE_NAME_PROP
@Path(value="//ur:ProjectName") @OptionalTable(length=128) public static final PropertyTag<java.lang.String> OGFUR_PROJECT_NAME_PROP
@Path(value="//ur:Queue") @AutoTable public static final PropertyTag<java.lang.String> OGFUR_QUEUE_PROP
@Path(value="//ur:StartTime") @AutoTable public static final PropertyTag<java.util.Date> OGFUR_START_TIME_PROP
@Path(value="//ur:Status") @AutoTable public static final PropertyTag<java.lang.String> OGFUR_STATUS_PROP
@Path(value="//ur:SubmitHost") @OptionalTable(length=128) public static final PropertyTag<java.lang.String> OGFUR_SUBMIT_HOST_PROP
@Path(value="//ur:WallDuration") @OptionalTable(target=java.lang.Long.class) public static final PropertyTag<uk.ac.ed.epcc.webapp.model.data.Duration> OGFUR_WALL_DURATION_PROP
@Path(value="//ur:CpuDuration") @OptionalTable(target=java.lang.Long.class) @AutoTable public static final PropertyTag<uk.ac.ed.epcc.webapp.model.data.Duration> OGFUR_CPU_DURATION_PROP
@Path(value="//ur:NodeCount") @AutoTable(target=java.lang.Integer.class) public static final PropertyTag<java.lang.Integer> OGFUR_NODE_COUNT_PROP
@Path(value="//ur:Processors") @AutoTable(target=java.lang.Integer.class) public static final PropertyTag<java.lang.Integer> OGFUR_PROCESSORS_PROP
@Path(value="//ur:ServiceLevel") @OptionalTable public static final PropertyTag<java.lang.String> OGFUR_SERVICE_LEVEL_PROP
@AutoTable(length=1024) public static final PropertyTag OGF_TEXT
public OGFXMLRecordParser(uk.ac.ed.epcc.webapp.AppContext context)
protected <T> void ADD_DERIVATON(PropExpressionMap map, PropertyTag<T> p1, PropertyTag<T> p2)
PropertyTags to be equal to
each other. Each of the two tags specified is added to the map with one as
an expression of the other.PropertyCastExceptionT - The type of PropertyTag each tag isp1 - The PropertyTag that is equivalent to p2p2 - The PropertyTag that is equivalent to p1public PropExpressionMap getDerivedProperties(PropExpressionMap previous)
PropertyContainerUpdaterDefinitions are allowed for properties that are also generated directly in the parse phase. In this case the parse value should always be used by preference and the derived definition only provides a fall-back implementation if the parse value is unavailable. For example if not persisted in the database layer. This allows one parser/policy to specify a default implementation as a derived property definition which is then overridden by having the same property generated in a parse method of a different policy/parser
getDerivedProperties in interface PropertyContainerUpdatergetDerivedProperties in class BatchParserprevious - Previous definitionsprotected ParsernameSpaceContext makeNameSpaceContext()
XMLRecordParsermakeNameSpaceContext in class XMLRecordParserprotected PropertyFinder initFinder(uk.ac.ed.epcc.webapp.AppContext context, PropertyFinder prev)
XMLRecordParserinitFinder in class XMLRecordParserprotected java.lang.String defaultSchemaName()
XMLRecordParserdefaultSchemaName in class XMLRecordParserpublic uk.ac.ed.epcc.webapp.jdbc.table.TableSpecification modifyDefaultTableSpecification(uk.ac.ed.epcc.webapp.AppContext c,
uk.ac.ed.epcc.webapp.jdbc.table.TableSpecification initial,
java.lang.String table_name)
PropertyContainerUpdatermodifyDefaultTableSpecification in interface PropertyContainerUpdatermodifyDefaultTableSpecification in class AbstractPropertyContainerParserc - AppContextinitial - TableSpecification or nullprotected java.lang.String[] getTargets()
getTargets in class XMLRecordParser