2006/unicorn/src/org/w3c/unicorn/tasklist TaskListUnmarshallerBeans.java,1.9,1.10 RDFUnmarshallerJena.java,1.2,1.3

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist
In directory hutz:/tmp/cvs-serv14825/src/org/w3c/unicorn/tasklist

Modified Files:
	TaskListUnmarshallerBeans.java RDFUnmarshallerJena.java 
Log Message:
log cleanup

Index: RDFUnmarshallerJena.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist/RDFUnmarshallerJena.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- RDFUnmarshallerJena.java	28 Aug 2009 12:39:53 -0000	1.2
+++ RDFUnmarshallerJena.java	23 Sep 2009 09:21:37 -0000	1.3
@@ -63,7 +63,7 @@
 	 * 
 	 */
 	public RDFUnmarshallerJena() {
-		RDFUnmarshallerJena.logger.trace("Constructor");
+		logger.trace("Constructor");
 		this.aModel = ModelFactory.createDefaultModel();
 	}
 
@@ -74,8 +74,8 @@
 	 *            The URL to add.
 	 */
 	public void addURL(final URL aURL) throws IOException {
-		RDFUnmarshallerJena.logger.trace("addURL");
-		RDFUnmarshallerJena.logger.debug("URL : " + aURL + ".");
+		logger.trace("addURL");
+		logger.debug("URL : " + aURL + ".");
 		final Model aModel = ModelFactory.createDefaultModel();
 		aModel.read(aURL.openStream(), null);
 		this.aModel.add(aModel);
@@ -90,7 +90,7 @@
 	 *            The name of the task.
 	 */
 	private void addLongName(final Task aTask, final Literal aLiteral) {
-		RDFUnmarshallerJena.logger.debug("LongName lang:"
+		logger.debug("LongName lang:"
 				+ aLiteral.getLanguage() + " value:" + aLiteral.getString()
 				+ ".");
 		aTask.addLongName(aLiteral.getLanguage(), aLiteral.getString());
@@ -105,7 +105,7 @@
 	 *            The description of the task.
 	 */
 	private void addDescription(final Task aTask, final Literal aLiteral) {
-		RDFUnmarshallerJena.logger.debug("Description lang:"
+		logger.debug("Description lang:"
 				+ aLiteral.getLanguage() + " value:" + aLiteral.getString()
 				+ ".");
 		aTask.addDescription(aLiteral.getLanguage(), aLiteral.getString());
@@ -120,7 +120,7 @@
 	 *            The name of the parameter.
 	 */
 	private void addLongName(final Parameter aParameter, final Literal aLiteral) {
-		RDFUnmarshallerJena.logger.debug("Parameter long name lang:"
+		logger.debug("Parameter long name lang:"
 				+ aLiteral.getLanguage() + " value:" + aLiteral.getString()
 				+ ".");
 		aParameter.addLongName(aLiteral.getLanguage(), aLiteral.getString());
@@ -135,7 +135,7 @@
 	 *            The name of the value.
 	 */
 	private void addLongName(final Value aValue, final Literal aLiteral) {
-		RDFUnmarshallerJena.logger.debug("Value long name lang:"
+		logger.debug("Value long name lang:"
 				+ aLiteral.getLanguage() + " value:" + aLiteral.getString()
 				+ ".");
 		aValue.addLongName(aLiteral.getLanguage(), aLiteral.getString());
@@ -154,11 +154,11 @@
 				RDFUnmarshallerJena.PROPERTY_REFERENCE).getLiteral().getString();
 		final Value oValue = aParameter.getValue(sValue);
 		if (null == oValue) {
-			RDFUnmarshallerJena.logger.warn("Value " + sValue
+			logger.warn("Value " + sValue
 					+ " not found in parameter " + aParameter.getName() + ".");
 			return;
 		}
-		RDFUnmarshallerJena.logger.debug("Parameter value  : " + sValue + ".");
+		logger.debug("Parameter value  : " + sValue + ".");
 		// find and add longName of the Value
 		for (final StmtIterator siLongName = aValue
 				.listProperties(RDFUnmarshallerJena.PROPERTY_LONGNAME); siLongName
@@ -183,11 +183,11 @@
 		final Parameter oParameter = aTask.getMapOfParameter().get(
 				sParameterReference);
 		if (null == oParameter) {
-			RDFUnmarshallerJena.logger.warn("Parameter " + sParameterReference
+			logger.warn("Parameter " + sParameterReference
 					+ " not found in task " + aTask.getID() + ".");
 			return;
 		}
-		RDFUnmarshallerJena.logger.debug("Parameter : " + sParameterReference
+		logger.debug("Parameter : " + sParameterReference
 				+ ".");
 		// find and add longName of the Parameter
 		for (StmtIterator siLongName = aParameter
@@ -203,7 +203,7 @@
 			final Resource aValue = (Resource) siValue.nextStatement()
 					.getObject();
 			if (null == aValue) {
-				RDFUnmarshallerJena.logger.error("Resource value == null.");
+				logger.error("Resource value == null.");
 				continue;
 			}
 			this.addValue(oParameter, aValue);
@@ -235,7 +235,7 @@
 				Framework.logger.debug(">> This is the default task.");
 			}
 		}
-		RDFUnmarshallerJena.logger.debug("Reference : "
+		logger.debug("Reference : "
 				+ aReference.getObject().toString() + ".");
 		// find and add longName of the task
 		for (final StmtIterator siLongName = aTask
@@ -259,7 +259,7 @@
 			final Resource aParameter = (Resource) siParameter.nextStatement()
 					.getObject();
 			if (null == aParameter) {
-				RDFUnmarshallerJena.logger.error("Resource parameter == null.");
+				logger.error("Resource parameter == null.");
 				continue;
 			}
 			this.addParameter(oTask, aParameter);
@@ -272,7 +272,7 @@
 	 * @see org.w3c.unicorn.util.Unmarshaller#unmarshal(java.net.URL)
 	 */
 	public void unmarshal() throws Exception {
-		RDFUnmarshallerJena.logger.trace("unmarshal");
+		logger.trace("unmarshal");
 
 		// find and add task
 		for (final StmtIterator siTask = this.aModel.listStatements(null,
@@ -281,7 +281,7 @@
 			final Resource aTask = siTask.nextStatement().getSubject();
 			this.addTask(aTask);
 		} // find and add task
-		RDFUnmarshallerJena.logger.trace("End.");
+		logger.trace("End.");
 	}
 
 	/**

Index: TaskListUnmarshallerBeans.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist/TaskListUnmarshallerBeans.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- TaskListUnmarshallerBeans.java	21 Sep 2009 13:15:55 -0000	1.9
+++ TaskListUnmarshallerBeans.java	23 Sep 2009 09:21:37 -0000	1.10
@@ -71,21 +71,21 @@
 	}
 
 	public TaskListUnmarshallerBeans(final Map<String, Observer> mapOfObserver) {
-		TaskListUnmarshallerBeans.logger.trace("Constructor");
+		logger.trace("Constructor");
 		//this.mapOfTask = new LinkedHashMap<String, org.w3c.unicorn.tasklist.Task>();
 		this.mapOfTask = new Tasklist();
 		this.mapOfObserver = mapOfObserver;
 	}
 
 	private void addTask(final TaskType aTask) throws ParameterException, UnknownObserverException {
-		TaskListUnmarshallerBeans.logger.trace("addTask");
+		logger.trace("addTask");
 
 		if (aTask == null) {
-			TaskListUnmarshallerBeans.logger.warn("Task : null");
+			logger.warn("Task : null");
 			return;
 		}
 
-		TaskListUnmarshallerBeans.logger.trace("Add task : "
+		logger.trace("Add task : "
 				+ aTask.getId());
 
 		final Task aTaskCurrent = new Task();
@@ -180,7 +180,7 @@
 	 * @return the created mapping
 	 */
 	private Mapping createMapping(final MappedType aMapped) {
-		TaskListUnmarshallerBeans.logger.trace("createMapping");
+		logger.trace("createMapping");
 
 		// The mapped observer
 		final String sMappingObserver = aMapped.getObserver();
@@ -188,7 +188,7 @@
 				.get(sMappingObserver);
 
 		if (aObserverMapped == null) {
-			TaskListUnmarshallerBeans.logger.error("The observer "
+			logger.error("The observer "
 					+ sMappingObserver
 					+ " does not seem to exist... Skipping mapping.");
 			return null;
@@ -231,7 +231,7 @@
 					.getEnumInputMethod(aTInputMethod);
 			// the observer can handle this input method
 			if (aObserverMapped.getInputMethod(aEnumInputMethod) == null) {
-				TaskListUnmarshallerBeans.logger.warn(sMappingObserver
+				logger.warn(sMappingObserver
 						+ " does not support " + aEnumInputMethod.value()
 						+ " input method.");
 				continue;
@@ -241,14 +241,14 @@
 					aEnumInputMethod).getCallParameterByName(sMappingParam);
 			// the parameter exists
 			if (aCallParameterMapped == null) {
-				TaskListUnmarshallerBeans.logger.error(sMappingObserver
+				logger.error(sMappingObserver
 						+ " does not have " + "a parameter named "
 						+ sMappingParam + ".");
 				continue;
 			}
 			// the value exists
 			if (!aCallParameterMapped.contains(sMappingValue)) {
-				TaskListUnmarshallerBeans.logger.error("Parameter "
+				logger.error("Parameter "
 						+ sMappingParam + " does not accept " + sMappingValue
 						+ " as a value.");
 				continue;
@@ -270,26 +270,18 @@
 			final String sObserverName, final TUi.Enum aTUi,
 			final String sDefaultValues, final TParamType.Enum aTParamType)
 			throws ParameterException {
-		TaskListUnmarshallerBeans.logger.trace("getParameterFromObserver");
-		if (TaskListUnmarshallerBeans.logger.isDebugEnabled()) {
-			TaskListUnmarshallerBeans.logger.debug("Parameter name : "
-					+ sParamName + ".");
-			TaskListUnmarshallerBeans.logger.debug("Observer name : "
-					+ sObserverName + ".");
-			TaskListUnmarshallerBeans.logger.debug("TUi : " + aTUi + ".");
-			TaskListUnmarshallerBeans.logger.debug("Default values : "
-					+ sDefaultValues + ".");
-			TaskListUnmarshallerBeans.logger.debug("TParamType : "
-					+ aTParamType + ".");
-		}
+		logger.trace("getParameterFromObserver");
+		logger.debug("Parameter name : " + sParamName + ".");
+		logger.debug("Observer name : " + sObserverName + ".");
+		logger.debug("TUi : " + aTUi + ".");
+		logger.debug("Default values : " + sDefaultValues + ".");
+		logger.debug("TParamType : " + aTParamType + ".");
 
 		final Observer aObserver = this.mapOfObserver.get(sObserverName);
 
 		// does the requested observer exist?
 		if (aObserver == null) {
-			TaskListUnmarshallerBeans.logger.warn("The parameter " + sParamName
-					+ "refers to a " + "non-existing observer: "
-					+ sObserverName + ".");
+			logger.warn("The parameter " + sParamName + "refers to a " + "non-existing observer: " + sObserverName + ".");
 			return null;
 		}
 
@@ -310,8 +302,7 @@
 			if (aInputMethod.getCallParameter().getName().equals(sParamName)) {
 				// the referenced parameter is an input one for the current
 				// method, so it must be ignored
-				TaskListUnmarshallerBeans.logger
-						.info("The referenced parameter is an input one for the current method, so it must be ignored.");
+				logger.info("The referenced parameter is an input one for the current method, so it must be ignored.");
 				continue;
 			}
 
@@ -371,9 +362,7 @@
 	 * @throws UnknownObserverException 
 	 */
 	public TLTNode expandTree(TaskType myTask, RoutineType subroutine) throws UnknownObserverException {
-		TaskListUnmarshallerBeans.logger
-				.trace("Creation of the tree based on the Task "
-						+ myTask.getId());
+		logger.trace("Creation of the tree based on the Task " + myTask.getId());
 		TLTNode root = new TLTNode();
 		root.setID(NodeID++);
 		for (ExecType exec : subroutine.getExecList()) {
@@ -398,7 +387,7 @@
 	 * @throws UnknownObserverException 
 	 */
 	private TLTIf fillIfs(TaskType myTask, IfType ifs) throws UnknownObserverException {
-		TaskListUnmarshallerBeans.logger.trace("Creation of an If ");
+		logger.trace("Creation of an If ");
 		// Create the if node
 		TLTIf ifnode = new TLTIf();
 		// Cares about the conditions
@@ -409,8 +398,7 @@
 			for (CondType condlist : myTask.getConds().getCondList()) {
 				if (condlist.getId().equals(cond)) {
 					TLTCond myCond = TLTCond.createCond(condlist.getType().toString());
-					TaskListUnmarshallerBeans.logger
-							.trace("Creation of a condition " + cond);
+					logger.trace("Creation of a condition " + cond);
 					myCond.setId(condlist.getId());
 					final Observer obs = Framework.mapOfObserver.get(condlist
 							.getObserver());
@@ -433,13 +421,11 @@
 
 		// Add recursively the inner ifs in the then part
 		if (ifs.getThen() != null) {
-			TaskListUnmarshallerBeans.logger
-					.trace("Call recursion for the Then ");
+			logger.trace("Call recursion for the Then ");
 			ifnode.setIfOk(expandTree(myTask, ifs.getThen()));
 			// Add recursively the inner if in the else part
 			if (ifs.getElse() != null) {
-				TaskListUnmarshallerBeans.logger
-						.trace("Call recursion for the else");
+				logger.trace("Call recursion for the else");
 				ifnode.setIfNotOk(expandTree(myTask, ifs.getElse()));
 			}
 		}
@@ -450,17 +436,12 @@
 			final TParamType.Enum aTParamType, final String sName,
 			final TUi.Enum aTUi, final String sDefaultValues,
 			final Map<String, Value> mapOfValue) throws ParameterException {
-		TaskListUnmarshallerBeans.logger.trace("createParameter");
-		if (TaskListUnmarshallerBeans.logger.isDebugEnabled()) {
-			TaskListUnmarshallerBeans.logger.debug("TParamType : "
-					+ aTParamType + ".");
-			TaskListUnmarshallerBeans.logger.debug("Name : " + sName + ".");
-			TaskListUnmarshallerBeans.logger.debug("TUi : " + aTUi + ".");
-			TaskListUnmarshallerBeans.logger.debug("Default values : "
-					+ sDefaultValues + ".");
-			TaskListUnmarshallerBeans.logger.debug("Map of value : "
-					+ mapOfValue + ".");
-		}
+		logger.trace("createParameter");
+		logger.debug("TParamType : " + aTParamType + ".");
+		logger.debug("Name : " + sName + ".");
+		logger.debug("TUi : " + aTUi + ".");
+		logger.debug("Default values : " + sDefaultValues + ".");
+		logger.debug("Map of value : " + mapOfValue + ".");
 
 		final org.w3c.unicorn.tasklist.parameters.Parameter aParameter = ParameterFactory
 				.getParameter(aTParamType);
@@ -495,32 +476,28 @@
 	}
 
 	public Tasklist getMapOfTask() {
-		TaskListUnmarshallerBeans.logger.trace("getMapOfTask");
+		logger.trace("getMapOfTask");
 		return this.mapOfTask;
 	}
 
 	public void addURL(URL aURL) throws IOException {
-		TaskListUnmarshallerBeans.logger.trace("addURL");
-		if (TaskListUnmarshallerBeans.logger.isDebugEnabled()) {
-			TaskListUnmarshallerBeans.logger.debug("URL : " + aURL + ".");
-		}
+		logger.trace("addURL");
+		logger.debug("URL : " + aURL + ".");
 
 		try {
 			this.aTaskList = TasklistDocument.Factory.parse(aURL.openStream());
 		} catch (XmlException e) {
-			TaskListUnmarshallerBeans.logger.error(
-					"Parsing error in TasklistUnmarshaller", e);
+			logger.error("Parsing error in TasklistUnmarshaller", e);
 			e.printStackTrace();
 		}
 	}
 
 	public void unmarshal() {
-		TaskListUnmarshallerBeans.logger.trace("unmarshal tasklist");
+		logger.trace("unmarshal tasklist");
 		// creates the tasklist without computing references
 		for (final TaskType aTask : this.aTaskList.getTasklist().getTaskList()) {
 			if (this.mapOfTask.containsKey(aTask.getId())) {
-				TaskListUnmarshallerBeans.logger.warn("Task with id "
-						+ aTask.getId() + " already defined.");
+				logger.warn("Task with id " + aTask.getId() + " already defined.");
 			} else {
 				try {
 					Framework.logger.debug("> Found task: " + aTask.getId());
@@ -538,8 +515,7 @@
 		// and parameters
 		for (final org.w3c.unicorn.tasklist.Task aTask : this.mapOfTask
 				.values()) {
-			TaskListUnmarshallerBeans.logger.debug("Expand task : "
-					+ aTask.getID() + ".");
+			logger.debug("Expand task : " + aTask.getID() + ".");
 			aTask.setTree(aTask.expandNode(mapOfTask, aTask.getTree()));
 		}
 

Received on Wednesday, 23 September 2009 09:21:50 UTC