1 / 25

CIP4 Tools

CIP4 Tools. The CIP4 JDF APIs Java C++ The CIP4 JDF Editor CheckJDF Elk. Reasons for an open source JDF API. JDF uses XML as a Database, not as a Markup Language lots of ID-IDREF linking Inheritance by nesting Enhanced Validation in addition to XML Schema

anitra
Download Presentation

CIP4 Tools

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIP4 Tools • The CIP4 JDF APIs • Java • C++ • The CIP4 JDF Editor • CheckJDF • Elk

  2. Reasons for an open source JDF API • JDF uses XML as a Database, not as a Markup Language • lots of ID-IDREF linking • Inheritance by nesting • Enhanced Validation in addition to XML Schema • Use of the same code base simplifies interoperability between vendors • Compile-time code validation through type safe classes instead of generic string based calls • Same spec interpretation through a common high level code base • Providing an open source API reduces barriers to adapting a JDF workflow

  3. Technical Requirements • Platform independent • Mapping of new C++ interfaces to preexisting JAVA interfaces • thread safety • Not thread-safe other than standard xerces • Support any character encodings • Unicode inside

  4. Xerces • Open source validating XML parser • Freely usable in commercial code • C++ and Java version exist • Validating and non-validating parsers • Schema • based on SUN and IBM XML parsers • Use version • 2.2 or higher in C++ • 2.4 in JAVA • download site:xml.apache.org

  5. NameSpaces in the JDFLib (DOM Standard) • Namespaces (DOM Lvl1/Lvl2) are supported! • Prefix != NameSpaceURI: • Example: xmlns:HDM=“www.heidelberg.com” • Prefix Handling: GetElement(“HDM:MoonPhase”); • XMLNS Handling: GetElement(“MoonPhase”,”www.heidelberg.com”); • Mixed XMLNS / Prefix handling is not supported • GetElement(“MoonPhase”,”HDM”); • GetElement(“HDM:MoonPhase”,”www.heidelberg.com”); • Mixing DOM lvl 1 and 2 may be hazardous to your code: • <JDF:JDF ID=“i1” JDF:ID=“i2”>

  6. High Level Design Features • Xerces provides both SAX and DOM Parsers • JDF requires an object tree in memory in order to navigate links / references • ==> Use the DOM implementation as base • (C++) No pointers, only lightweight DOM wrapper classes. • (C++) Standard Template Library • Strings • Vectors • Maps • (C++) gracefully handles Null elements • nullElement.GetAttribute(“foo”) returns “”; • Java implementation relies on standard Java interfaces

  7. Automatic Classes Generator Schema Type-Safe Code Generator • Java and C++ are generated • Schema still has limits: • requires element ordering or unlimited Cardinality • nesting support not available • API validation is always stronger than Schema validation • Based on standard schema with additional meta-data (annotations) • Naming Conventions based on the JDF Specification

  8. DOM_Element: Xerces KElement: STL String wrapper JDFElement: First JDF specific layer JDFResource: Resource Abstraction layer JDFAutoRunList: Automatic Schema-Generated RunList Abstraction layer JDFRunList: Hand-Coded RunList Abstraction layer JDF Parser Class Layers

  9. Additional Open Source Utilities (C++ Only – Included in Java.xxx) • Not directly parser related • Simplify JDF implementation • Mime Handling • HTTP Message Client interface • SSL Support • PNG Support • PNG GreyScale Separations • File IO abstraction

  10. CIP4 JDF Editor • Java based tool to display JDF and JMF • Validating • Based on JDFLib-J • Mac and Win version • Pros • very nice Process view • free • Future • improved Process view • CheckJDF validation

  11. Screenshot JDF editor

  12. JDF Validators • check complete context, links • CheckJDF • future: CIP4 JDF Editor

  13. CheckJDF • CIP4 DOS tool to check against • schema (Xerces parser, XML limitations) • JDF rules (more strict) • Correct links between resources • Name mangling • Unlinked Resources • Links that reference Nirvana • Correct Partitioning • Misspelt separation names • Pros • check if file is valid or not (or nearly valid) • Cons • output is difficult to read in case of errors • also available as service on CIP4 website

  14. Web based CheckJDF 1.2 • http://www.cip4.org/intern/checkjdf/upload.php

  15. CheckJDF output Output of the XERCES schema validation follows: error Datatype error: Type:InvalidDatatypeValueException, Message:Value 'Ready' is not in enumeration . error ID attribute 'RNL00O_D' was referenced but never declared ********************************************************** Output of checkJDF proper follows: dangling ResLink: <RunListLink xmlns="http://www.CIP4.org/JDFSchema_1_1" ProcessUsage="Document" Usage="Input" rRef="RNL00O_D"/> Warning: Separation Name not in ColorPool: Zwart !!! InValid Element: /JDF/ResourcePool[1]/ColorPool[1] ColorPool !!! Invalid Attribute: Status = Ready !!! InValid Element: /JDF/ResourcePool[1]/ColorantControl[1] ColorantControl !!! Invalid Element - (potential reference to invalid element): ColorPoolRef !!! InValid Element: /JDF/JDF[1]/JDF[1]/JDF[3]/ResourceLinkPool[1]/RunListLink[1] !!!

  16. ElkA JDF Device Frameworkbased on CIP4’s JDFLib-J Claes BuckwalterCCMT, Linköping University, Sweden http://media.itn.liu.se

  17. Goal • To design and implement an application framework, in Java, that provides the basic services needed by a JDF device and that allows pluggable JDF device implementations.

  18. The Elk Framework • Package name: org.cip4.elk • Interfaces and abstract classes that specify the services needed by a Device: • Incoming/outgoing message dispatchers • JMF processors/handlers • JMF servlet • Queue • Process • Subscription manager • Factory for JDF elements

  19. JMFCommand/Query/Signal Synchronous Asynchronous Incoming JMF Dispatcher Registers subscriptions KnownMessagesProcessor QueueStatusProcessor SubmitQueueEntryProcessor StatusProcessor EventsProcessor Other JMFProcessors Events Events Poll for new job Queue Process Subscription Manager Dispatches subscription queries Acknowledge Signal Signal Outgoing JMF Dispatcher JMF Acknowledge/SignalJDF

  20. Reference Implementation • Package name: org.cip4.elk.impl • Concrete implementations of the classes defined in the Elk Framework: • Dispatching JMF servlet • Synchronous message dispatchers • 10 JMF processors • Memory-based subscription manager • Memory-based queue • Approval process • MIME package reader • Tool for accessing URLs (http, https, file, ftp)

  21. Approval Device KnownMessagesJMFProcessor QueueStatusJMFProcessor HoldQueueJMFProcessor DispatchingJMFServlet SubscribingIncomingJMFDispatcher ResumeQueueJMFProcessor MemoryQueue CloseQueueJMFProcessor OpenQueueJMFProcessor ElkStartupServlet SubmitQueueEntryJMFProcessor ApprovalProcess DeviceConfig StatusJMFProcessor FileUtil EventsJMFProcessor StopPersChannelJMFProcessor SynchronousHttpOutgoingJMFDispatcher SimpleSubscriptionManager

  22. Test Tools • Command-line client for sending JMF, JDF and MIME • Proxy support • HTTPS support • Servlet for testing MIME-sending clientshttp://cog.itn.liu.se:8080/elk/mime

  23. To be done... • The Elk Framework • Refactor JMFProcessor into 3 interfaces • SignalProcessor • QueryProcessor • CommandProcessor • More inter-device events • Add/refactor as reference implementation evolves • Reference implementation • Add support for all (38) JMF message types • Asynchronous messaging • Full subscription/persistent channel support • Receive and submit MIME • Full queue support • Better process implementation

  24. Release 0.5 • A binary and source release will be posted on the project web site this week http://cog.itn.liu.se/~clabu/files/elk/

  25. Live Demo • http://cog.itn.liu.se:8080/elk/jmfSend a KnownMessages query to it • http://cog.itn.liu.se:8080/elk/mimeSend MIME packages to it

More Related